pub struct TopicAssignment(/* private fields */);Expand description
Configuration for a “logical” topic/datasink that Relay should forward data into.
Can be either a string containing the kafka topic name to produce into (using the default
kafka_config), an object containing keys topic_name and kafka_config_name for using a
custom kafka cluster, or an array of topic names/configs for sharded topics.
See documentation for secondary_kafka_configs for more information.
Implementations§
Source§impl TopicAssignment
 
impl TopicAssignment
Sourcepub fn kafka_configs<'a>(
    &'a self,
    default_config: &'a Vec<KafkaConfigParam>,
    secondary_configs: &'a BTreeMap<String, Vec<KafkaConfigParam>>,
) -> Result<KafkaTopicConfig<'a>, ConfigError>
 
pub fn kafka_configs<'a>( &'a self, default_config: &'a Vec<KafkaConfigParam>, secondary_configs: &'a BTreeMap<String, Vec<KafkaConfigParam>>, ) -> Result<KafkaTopicConfig<'a>, ConfigError>
Get the Kafka configs for the current topic assignment.
§Errors
Returns ConfigError if the configuration for the current topic assignment is invalid.
Trait Implementations§
Source§impl Debug for TopicAssignment
 
impl Debug for TopicAssignment
Source§impl<'de> Deserialize<'de> for TopicAssignment
 
impl<'de> Deserialize<'de> for TopicAssignment
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
Source§impl From<String> for TopicAssignment
 
impl From<String> for TopicAssignment
Auto Trait Implementations§
impl Freeze for TopicAssignment
impl RefUnwindSafe for TopicAssignment
impl Send for TopicAssignment
impl Sync for TopicAssignment
impl Unpin for TopicAssignment
impl UnwindSafe for TopicAssignment
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