Struct google_api_proto::google::devtools::remoteworkers::v1test2::BotSession
source · pub struct BotSession {
pub name: String,
pub bot_id: String,
pub status: i32,
pub worker: Option<Worker>,
pub leases: Vec<Lease>,
pub expire_time: Option<Timestamp>,
pub version: String,
}
Expand description
A bot session represents the state of a bot while in continuous contact with the server for a period of time. The session includes information about the worker - that is, the worker (the physical or virtual hardware) is considered to be a property of the bot (the software agent running on that hardware), which is the reverse of real life, but more natural from the point of the view of this API, which communicates solely with the bot and not directly with the underlying worker.
Fields§
§name: String
The bot session name, as selected by the server. Output only during a call to CreateBotSession.
bot_id: String
A unique bot ID within the farm used to persistently identify this bot over
time (i.e., over multiple sessions). This ID must be unique within a
farm. Typically, the bot ID will be the same as the name of the primary
device in the worker (e.g., what you’d get from typing uname -n
on *nix),
but this is not required since a single device may allow multiple bots to
run on it, each with access to different resources. What is important is
that this ID is meaningful to humans, who might need to hunt a physical
machine down to fix it.
When CreateBotSession is successfully called with a bot_id, all prior sessions with the same ID are invalidated. If a bot attempts to update an invalid session, the server must reject that request, and may also quarantine the other bot with the same bot IDs (ie, stop sending it new leases and alert an admin).
status: i32
The status of the bot. This must be populated in every call to UpdateBotSession.
worker: Option<Worker>
A description of the worker hosting this bot. The Worker message is used here in the Status context (see Worker for more information). If multiple bots are running on the worker, this field should only describe the resources accessible from this bot.
During the call to CreateBotSession, the server may make arbitrary changes
to the worker’s server_properties
field (see that field for more
information). Otherwise, this field is input-only.
leases: Vec<Lease>
A list of all leases that are a part of this session. See the Lease message for details.
expire_time: Option<Timestamp>
The time at which this bot session will expire, unless the bot calls UpdateBotSession again. Output only.
version: String
The version of the bot code currently running. The server may use this information to issue an admin action to tell the bot to update itself.
Implementations§
source§impl BotSession
impl BotSession
Trait Implementations§
source§impl Clone for BotSession
impl Clone for BotSession
source§fn clone(&self) -> BotSession
fn clone(&self) -> BotSession
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BotSession
impl Debug for BotSession
source§impl Default for BotSession
impl Default for BotSession
source§impl Message for BotSession
impl Message for BotSession
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for BotSession
impl PartialEq for BotSession
source§fn eq(&self, other: &BotSession) -> bool
fn eq(&self, other: &BotSession) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for BotSession
Auto Trait Implementations§
impl Freeze for BotSession
impl RefUnwindSafe for BotSession
impl Send for BotSession
impl Sync for BotSession
impl Unpin for BotSession
impl UnwindSafe for BotSession
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