1#![cfg_attr(docsrs, feature(doc_cfg))]
44
45pub mod core;
46
47mod admin;
48mod client;
49mod config;
50mod exporter;
51mod gelf;
52mod gelf_transport;
53mod logquery;
54mod models;
55mod otlp;
56mod search;
57mod tls;
58
59#[cfg(feature = "blocking")]
60#[cfg_attr(docsrs, doc(cfg(feature = "blocking")))]
61pub mod blocking;
62
63#[cfg(feature = "testing")]
64#[cfg_attr(docsrs, doc(cfg(feature = "testing")))]
65pub mod testing;
66
67pub mod logging;
68
69pub use crate::core::{Error, ErrorCode, HealthStatus, Result, RetryPolicy, Secret};
70
71pub use crate::config::{
72 GelfProtocol, DEFAULT_GELF_HTTP_PORT, DEFAULT_GELF_PORT, DEFAULT_OTLP_GRPC_PORT,
73 DEFAULT_REQUESTED_BY, DEFAULT_URL,
74};
75
76pub use crate::client::{GraylogClient, HEADER_NODE_ID, HEADER_REQUESTED_BY};
77
78pub use crate::admin::{
79 CreateInputOptions, CreateStreamOptions, EnsureGelfInputOptions, EnsuredInput,
80 ListStreamsOptions,
81};
82pub use crate::exporter::{GelfLogExporter, GelfTransportOptions, LogOptions};
83pub use crate::gelf::{
84 flatten_attributes, gelf_field_key, gelf_field_value, gelf_level_to_severity, gelf_timestamp,
85 severity_to_gelf_level, validate_gelf_field_key, FromLogRecordOptions, GelfLevel, GelfMessage,
86 GelfMessageOptions, GELF_VERSION,
87};
88pub use crate::gelf_transport::{
89 encode_gelf_udp, frame_gelf_tcp, GelfCompression, GelfHttpOptions, GelfHttpTransport,
90 GelfSendOptions, GelfSendResult, GelfTcpOptions, GelfTcpTransport, GelfTransport,
91 GelfUdpOptions, GelfUdpTransport, DEFAULT_UDP_CHUNK_SIZE, GELF_CHUNK_HEADER_SIZE,
92 GELF_CHUNK_MAGIC, GELF_MAX_CHUNKS,
93};
94pub use crate::logquery::{
95 LogQuery, LogQueryOptions, DEFAULT_LOG_QUERY_WINDOW, DEFAULT_TAIL_INTERVAL,
96};
97pub use crate::models::{
98 IndexSet, Input, InputState, Stream, StreamPage, StreamRule, SystemInfo, INPUT_STATE_FAILED,
99 INPUT_STATE_RUNNING, INPUT_TYPE_GELF_HTTP, INPUT_TYPE_GELF_TCP, INPUT_TYPE_GELF_UDP,
100 INPUT_TYPE_OTEL_GRPC, STREAM_RULE_ALWAYS_MATCH, STREAM_RULE_CONTAINS, STREAM_RULE_EXACT,
101 STREAM_RULE_GREATER, STREAM_RULE_MATCH_INPUT, STREAM_RULE_PRESENCE, STREAM_RULE_REGEX,
102 STREAM_RULE_SMALLER,
103};
104pub use crate::otlp::{
105 decode_export_logs_response, encode_export_logs_request, error_for_grpc_status,
106 OtlpGrpcLogExporter, OtlpGrpcLogExporterOptions, OtlpPartialSuccess, OTLP_LOGS_EXPORT_PATH,
107 OTLP_SCOPE_NAME,
108};
109pub use crate::search::{
110 log_record_from_message, Message, MessageSearchOptions, MessageSearchResult, SearchSort,
111 DEFAULT_MESSAGE_SORT_FIELD, DEFAULT_SEARCH_LIMIT, DEFAULT_SEARCH_RANGE, MAX_SEARCH_LIMIT,
112 RESOURCE_FIELDS,
113};
114
115pub use crate::config::GraylogConfig;
116
117pub use crate::config::GraylogConfigBuilder;
118
119pub type GraylogError = Error;