[][src]Struct fleetspeak_proto::common::Message

pub struct Message {
    pub message_id: Vec<u8>,
    pub source: Option<Address>,
    pub source_message_id: Vec<u8>,
    pub destination: Option<Address>,
    pub message_type: String,
    pub creation_time: Option<Timestamp>,
    pub data: Option<Any>,
    pub validation_info: Option<ValidationInfo>,
    pub result: Option<MessageResult>,
    pub priority: i32,
    pub background: bool,
    pub annotations: Option<Annotations>,
}

Fields

message_id: Vec<u8>

A hash based on origin and origin_message_id. It is set by the fleetspeak system on message intake and may be used for deduplication.

source: Option<Address>

The source of the messages. Required.

source_message_id: Vec<u8>

An sequence of bytes set by the source in a way to uniquely identify the message among all messages with the same origin.

destination: Option<Address>

The destination of the message. Required.

message_type: String

The type of message. This field is mostly opaque to the Fleetspeak system, but can be used for some statistics gathering. It is recommended that each service define a static collection of short readable message types and dispatch according to this when processing messages. e.g. "ResourceUsage", "StdOutputData".

creation_time: Option<Timestamp>

Set when the message enters the FS system.

data: Option<Any>

The data associated with this request, accepted types are determined by the service and may depend on message_type. Not typically stored after the message is processed.

validation_info: Option<ValidationInfo>

Additional validation information, set by on the server by the (optional) authorizer component based on WrappedContactData.validators, etc.

result: Option<MessageResult>

The result of processing the message. Set once processing has finished.

priority: i32background: bool

A background message does not count as activity when deciding how fast to poll the server. This flag should be set on messages which are unlikely to trigger additional activity.

annotations: Option<Annotations>

Optional debugging information provided by the originator of the message. Fleetspeak stores this information along with the message for later retrieval, but doesn't really do anything else with it.

Methods

impl Message[src]

pub fn priority(&self) -> Priority[src]

Returns the enum value of priority, or the default if the field is set to an invalid enum value.

pub fn set_priority(&mut self, value: Priority)[src]

Sets priority to the provided enum value.

Trait Implementations

impl Clone for Message[src]

impl Debug for Message[src]

impl Default for Message[src]

impl Message for Message[src]

impl PartialEq<Message> for Message[src]

impl StructuralPartialEq for Message[src]

Auto Trait Implementations

impl RefUnwindSafe for Message

impl Send for Message

impl Sync for Message

impl Unpin for Message

impl UnwindSafe for Message

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.