Struct googapis::google::cloud::runtimeconfig::v1beta1::Waiter[][src]

pub struct Waiter {
    pub name: String,
    pub timeout: Option<Duration>,
    pub failure: Option<EndCondition>,
    pub success: Option<EndCondition>,
    pub create_time: Option<Timestamp>,
    pub done: bool,
    pub error: Option<Status>,
}
Expand description

A Waiter resource waits for some end condition within a RuntimeConfig resource to be met before it returns. For example, assume you have a distributed system where each node writes to a Variable resource indidicating the node’s readiness as part of the startup process.

You then configure a Waiter resource with the success condition set to wait until some number of nodes have checked in. Afterwards, your application runs some arbitrary code after the condition has been met and the waiter returns successfully.

Once created, a Waiter resource is immutable.

To learn more about using waiters, read the Creating a Waiter documentation.

Fields

name: String

The name of the Waiter resource, in the format:

projects/\[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME\]

The \[PROJECT_ID\] must be a valid Google Cloud project ID, the \[CONFIG_NAME\] must be a valid RuntimeConfig resource, the \[WAITER_NAME\] must match RFC 1035 segment specification, and the length of \[WAITER_NAME\] must be less than 64 bytes.

After you create a Waiter resource, you cannot change the resource name.

timeout: Option<Duration>

[Required] Specifies the timeout of the waiter in seconds, beginning from the instant that waiters().create method is called. If this time elapses before the success or failure conditions are met, the waiter fails and sets the error code to DEADLINE_EXCEEDED.

failure: Option<EndCondition>

[Optional] The failure condition of this waiter. If this condition is met, done will be set to true and the error code will be set to ABORTED. The failure condition takes precedence over the success condition. If both conditions are met, a failure will be indicated. This value is optional; if no failure condition is set, the only failure scenario will be a timeout.

success: Option<EndCondition>

[Required] The success condition. If this condition is met, done will be set to true and the error value will remain unset. The failure condition takes precedence over the success condition. If both conditions are met, a failure will be indicated.

create_time: Option<Timestamp>

[Output Only] The instant at which this Waiter resource was created. Adding the value of timeout to this instant yields the timeout deadline for the waiter.

done: bool

[Output Only] If the value is false, it means the waiter is still waiting for one of its conditions to be met.

If true, the waiter has finished. If the waiter finished due to a timeout or failure, error will be set.

error: Option<Status>

[Output Only] If the waiter ended due to a failure or timeout, this value will be set.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Returns the encoded length of the message without a length delimiter.

Clears the message, resetting all fields to their default.

Encodes the message to a buffer. Read more

Encodes the message to a newly allocated buffer.

Encodes the message with a length-delimiter to a buffer. Read more

Encodes the message with a length-delimiter to a newly allocated buffer.

Decodes an instance of the message from a buffer. Read more

Decodes a length-delimited instance of the message from the buffer.

Decodes an instance of the message from a buffer, and merges it into self. Read more

Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more