pub struct CreateContextRequest {
pub server_def: Option<ServerDef>,
pub async: bool,
pub keep_alive_secs: i64,
pub version_def: Option<VersionDef>,
pub cluster_device_attributes: Vec<DeviceAttributes>,
pub context_id: u64,
}
Fields§
§server_def: Option<ServerDef>
Identifies the full cluster, and this particular worker’s position within.
async: bool
Whether the ops on the worker should be executed synchronously or asynchronously. By default, ops are executed synchronously.
keep_alive_secs: i64
Number of seconds to keep the context alive. If more than keep_alive_secs has passed since a particular context has been communicated with, it will be garbage collected.
version_def: Option<VersionDef>
This is the version for all the ops that will be enqueued by the client.
cluster_device_attributes: Vec<DeviceAttributes>
Device attributes in the cluster
context_id: u64
The ID of the created context. This is usually a randomly generated number, that will be used to identify the context in future requests to the service. Contexts are not persisted through server restarts. This ID will be used for all future communications as well. It is essential that both ends use this ID for selecting a rendezvous to get everything to match.
Trait Implementations§
Source§impl Clone for CreateContextRequest
impl Clone for CreateContextRequest
Source§fn clone(&self) -> CreateContextRequest
fn clone(&self) -> CreateContextRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CreateContextRequest
impl Debug for CreateContextRequest
Source§impl Default for CreateContextRequest
impl Default for CreateContextRequest
Source§impl Message for CreateContextRequest
impl Message for CreateContextRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.