#[non_exhaustive]pub struct Connector {
pub name: String,
pub configs: HashMap<String, String>,
pub state: State,
pub restart_policy: Option<RestartPolicy>,
/* private fields */
}Expand description
A Kafka Connect connector in a given ConnectCluster.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringIdentifier. The name of the connector. Structured like: projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}
configs: HashMap<String, String>Optional. Connector config as keys/values.
The keys of the map are connector property names, for example:
connector.class, tasks.max, key.converter.
state: StateOutput only. The current state of the connector.
restart_policy: Option<RestartPolicy>A policy that specifies how to restart the failed connectors/tasks in a Cluster resource. If not set, the failed connectors/tasks won’t be restarted.
Implementations§
Source§impl Connector
impl Connector
pub fn new() -> Self
Sourcepub fn set_configs<T, K, V>(self, v: T) -> Self
pub fn set_configs<T, K, V>(self, v: T) -> Self
Sets the value of configs.
Sourcepub fn set_restart_policy<T: Into<Option<RestartPolicy>>>(self, v: T) -> Self
pub fn set_restart_policy<T: Into<Option<RestartPolicy>>>(self, v: T) -> Self
Sets the value of restart_policy.
Note that all the setters affecting restart_policy are mutually
exclusive.
Sourcepub fn task_restart_policy(&self) -> Option<&Box<TaskRetryPolicy>>
pub fn task_restart_policy(&self) -> Option<&Box<TaskRetryPolicy>>
The value of restart_policy
if it holds a TaskRestartPolicy, None if the field is not set or
holds a different branch.
Sourcepub fn set_task_restart_policy<T: Into<Box<TaskRetryPolicy>>>(
self,
v: T,
) -> Self
pub fn set_task_restart_policy<T: Into<Box<TaskRetryPolicy>>>( self, v: T, ) -> Self
Sets the value of restart_policy
to hold a TaskRestartPolicy.
Note that all the setters affecting restart_policy are
mutually exclusive.