pub struct Cluster {Show 13 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub state: i32,
pub uid: String,
pub replica_count: Option<i32>,
pub authorization_mode: i32,
pub transit_encryption_mode: i32,
pub size_gb: Option<i32>,
pub shard_count: Option<i32>,
pub psc_configs: Vec<PscConfig>,
pub discovery_endpoints: Vec<DiscoveryEndpoint>,
pub psc_connections: Vec<PscConnection>,
pub state_info: Option<StateInfo>,
}
Expand description
A cluster instance.
Fields§
§name: String
Required. Unique name of the resource in this scope including project and
location using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}
create_time: Option<Timestamp>
Output only. The timestamp associated with the cluster creation request.
state: i32
Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
uid: String
Output only. System assigned, unique identifier for the cluster.
replica_count: Option<i32>
Optional. The number of replica nodes per shard.
Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
transit_encryption_mode: i32
Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
size_gb: Option<i32>
Output only. Redis memory size in GB for the entire cluster.
shard_count: Option<i32>
Required. Number of shards for the Redis cluster.
psc_configs: Vec<PscConfig>
Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.
discovery_endpoints: Vec<DiscoveryEndpoint>
Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.
psc_connections: Vec<PscConnection>
Output only. PSC connections for discovery of the cluster topology and accessing the cluster.
state_info: Option<StateInfo>
Output only. Additional information about the current state of the cluster.
Implementations§
source§impl Cluster
impl Cluster
sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn replica_count(&self) -> i32
pub fn replica_count(&self) -> i32
Returns the value of replica_count
, or the default value if replica_count
is unset.
Returns the enum value of authorization_mode
, or the default if the field is set to an invalid enum value.
Sets authorization_mode
to the provided enum value.
sourcepub fn transit_encryption_mode(&self) -> TransitEncryptionMode
pub fn transit_encryption_mode(&self) -> TransitEncryptionMode
Returns the enum value of transit_encryption_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_transit_encryption_mode(&mut self, value: TransitEncryptionMode)
pub fn set_transit_encryption_mode(&mut self, value: TransitEncryptionMode)
Sets transit_encryption_mode
to the provided enum value.
sourcepub fn size_gb(&self) -> i32
pub fn size_gb(&self) -> i32
Returns the value of size_gb
, or the default value if size_gb
is unset.
sourcepub fn shard_count(&self) -> i32
pub fn shard_count(&self) -> i32
Returns the value of shard_count
, or the default value if shard_count
is unset.
Trait Implementations§
source§impl Message for Cluster
impl Message for Cluster
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq for Cluster
impl PartialEq for Cluster
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnwindSafe for Cluster
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request