pub struct Kafka {
pub brokers: Vec<String>,
pub topic: String,
pub message_timeout_ms: u32,
pub properties: BTreeMap<String, String>,
}Expand description
[auditor.kafka]: where audit events are produced to.
Fields§
§brokers: Vec<String>Bootstrap broker list, e.g. ["kafka.example.com:9092"].
topic: StringTopic every audit event is produced to.
message_timeout_ms: u32librdkafka message.timeout.ms: how long a queued event keeps
retrying delivery before it is dropped (and a warning logged).
properties: BTreeMap<String, String>Extra librdkafka client properties, passed through verbatim —
typically transport security: security.protocol,
ssl.ca.location, sasl.mechanism, sasl.username,
sasl.password, … Values are never printed (they may hold
credentials); only the keys are.
Implementations§
Source§impl Kafka
impl Kafka
Sourcepub fn build_sink(&self) -> Result<KafkaSink, MantaError>
pub fn build_sink(&self) -> Result<KafkaSink, MantaError>
Build the producer. librdkafka connects lazily, so this does not need a reachable broker — but it does validate every property.
§Errors
MantaError::KafkaError on an invalid configuration (see
client_config) or a property librdkafka rejects.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Kafka
impl<'de> Deserialize<'de> for Kafka
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Kafka
impl RefUnwindSafe for Kafka
impl Send for Kafka
impl Sync for Kafka
impl Unpin for Kafka
impl UnsafeUnpin for Kafka
impl UnwindSafe for Kafka
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.