#[non_exhaustive]pub struct CrossClusterReplicationConfig {
pub cluster_role: ClusterRole,
pub primary_cluster: Option<RemoteCluster>,
pub secondary_clusters: Vec<RemoteCluster>,
pub update_time: Option<Timestamp>,
pub membership: Option<Membership>,
/* private fields */
}Expand description
Cross cluster replication config.
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.cluster_role: ClusterRoleThe role of the cluster in cross cluster replication.
primary_cluster: Option<RemoteCluster>Details of the primary cluster that is used as the replication source for this secondary cluster.
This field is only set for a secondary cluster.
secondary_clusters: Vec<RemoteCluster>List of secondary clusters that are replicating from this primary cluster.
This field is only set for a primary cluster.
update_time: Option<Timestamp>Output only. The last time cross cluster replication config was updated.
membership: Option<Membership>Output only. An output only view of all the member clusters participating in the cross cluster replication. This view will be provided by every member cluster irrespective of its cluster role(primary or secondary).
A primary cluster can provide information about all the secondary clusters replicating from it. However, a secondary cluster only knows about the primary cluster from which it is replicating. However, for scenarios, where the primary cluster is unavailable(e.g. regional outage), a GetCluster request can be sent to any other member cluster and this field will list all the member clusters participating in cross cluster replication.
Implementations§
Source§impl CrossClusterReplicationConfig
impl CrossClusterReplicationConfig
pub fn new() -> Self
Sourcepub fn set_cluster_role<T: Into<ClusterRole>>(self, v: T) -> Self
pub fn set_cluster_role<T: Into<ClusterRole>>(self, v: T) -> Self
Sets the value of cluster_role.
Sourcepub fn set_primary_cluster<T>(self, v: T) -> Selfwhere
T: Into<RemoteCluster>,
pub fn set_primary_cluster<T>(self, v: T) -> Selfwhere
T: Into<RemoteCluster>,
Sets the value of primary_cluster.
Sourcepub fn set_or_clear_primary_cluster<T>(self, v: Option<T>) -> Selfwhere
T: Into<RemoteCluster>,
pub fn set_or_clear_primary_cluster<T>(self, v: Option<T>) -> Selfwhere
T: Into<RemoteCluster>,
Sets or clears the value of primary_cluster.
Sourcepub fn set_secondary_clusters<T, V>(self, v: T) -> Self
pub fn set_secondary_clusters<T, V>(self, v: T) -> Self
Sets the value of secondary_clusters.
Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
Sourcepub fn set_membership<T>(self, v: T) -> Selfwhere
T: Into<Membership>,
pub fn set_membership<T>(self, v: T) -> Selfwhere
T: Into<Membership>,
Sets the value of membership.
Sourcepub fn set_or_clear_membership<T>(self, v: Option<T>) -> Selfwhere
T: Into<Membership>,
pub fn set_or_clear_membership<T>(self, v: Option<T>) -> Selfwhere
T: Into<Membership>,
Sets or clears the value of membership.
Trait Implementations§
Source§impl Clone for CrossClusterReplicationConfig
impl Clone for CrossClusterReplicationConfig
Source§fn clone(&self) -> CrossClusterReplicationConfig
fn clone(&self) -> CrossClusterReplicationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for CrossClusterReplicationConfig
impl Default for CrossClusterReplicationConfig
Source§fn default() -> CrossClusterReplicationConfig
fn default() -> CrossClusterReplicationConfig
Source§impl PartialEq for CrossClusterReplicationConfig
impl PartialEq for CrossClusterReplicationConfig
Source§fn eq(&self, other: &CrossClusterReplicationConfig) -> bool
fn eq(&self, other: &CrossClusterReplicationConfig) -> bool
self and other values to be equal, and is used by ==.