#![cfg_attr(docsrs, feature(doc_cfg))]
pub mod core;
mod admin;
mod client;
mod config;
mod exporter;
mod gelf;
mod gelf_transport;
mod logquery;
mod models;
mod otlp;
mod search;
mod tls;
#[cfg(feature = "blocking")]
#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
pub mod blocking;
#[cfg(feature = "testing")]
#[cfg_attr(docsrs, doc(cfg(feature = "testing")))]
pub mod testing;
pub mod logging;
pub use crate::core::{Error, ErrorCode, HealthStatus, Result, RetryPolicy, Secret};
pub use crate::config::{
GelfProtocol, DEFAULT_GELF_HTTP_PORT, DEFAULT_GELF_PORT, DEFAULT_OTLP_GRPC_PORT,
DEFAULT_REQUESTED_BY, DEFAULT_URL,
};
pub use crate::client::{GraylogClient, HEADER_NODE_ID, HEADER_REQUESTED_BY};
pub use crate::admin::{
CreateInputOptions, CreateStreamOptions, EnsureGelfInputOptions, EnsuredInput,
ListStreamsOptions,
};
pub use crate::exporter::{GelfLogExporter, GelfTransportOptions, LogOptions};
pub use crate::gelf::{
flatten_attributes, gelf_field_key, gelf_field_value, gelf_level_to_severity, gelf_timestamp,
severity_to_gelf_level, validate_gelf_field_key, FromLogRecordOptions, GelfLevel, GelfMessage,
GelfMessageOptions, GELF_VERSION,
};
pub use crate::gelf_transport::{
encode_gelf_udp, frame_gelf_tcp, GelfCompression, GelfHttpOptions, GelfHttpTransport,
GelfSendOptions, GelfSendResult, GelfTcpOptions, GelfTcpTransport, GelfTransport,
GelfUdpOptions, GelfUdpTransport, DEFAULT_UDP_CHUNK_SIZE, GELF_CHUNK_HEADER_SIZE,
GELF_CHUNK_MAGIC, GELF_MAX_CHUNKS,
};
pub use crate::logquery::{
LogQuery, LogQueryOptions, DEFAULT_LOG_QUERY_WINDOW, DEFAULT_TAIL_INTERVAL,
};
pub use crate::models::{
IndexSet, Input, InputState, Stream, StreamPage, StreamRule, SystemInfo, INPUT_STATE_FAILED,
INPUT_STATE_RUNNING, INPUT_TYPE_GELF_HTTP, INPUT_TYPE_GELF_TCP, INPUT_TYPE_GELF_UDP,
INPUT_TYPE_OTEL_GRPC, STREAM_RULE_ALWAYS_MATCH, STREAM_RULE_CONTAINS, STREAM_RULE_EXACT,
STREAM_RULE_GREATER, STREAM_RULE_MATCH_INPUT, STREAM_RULE_PRESENCE, STREAM_RULE_REGEX,
STREAM_RULE_SMALLER,
};
pub use crate::otlp::{
decode_export_logs_response, encode_export_logs_request, error_for_grpc_status,
OtlpGrpcLogExporter, OtlpGrpcLogExporterOptions, OtlpPartialSuccess, OTLP_LOGS_EXPORT_PATH,
OTLP_SCOPE_NAME,
};
pub use crate::search::{
log_record_from_message, Message, MessageSearchOptions, MessageSearchResult, SearchSort,
DEFAULT_MESSAGE_SORT_FIELD, DEFAULT_SEARCH_LIMIT, DEFAULT_SEARCH_RANGE, MAX_SEARCH_LIMIT,
RESOURCE_FIELDS,
};
pub use crate::config::GraylogConfig;
pub use crate::config::GraylogConfigBuilder;
pub type GraylogError = Error;