Crate swimos_agent_protocol

Crate swimos_agent_protocol 

Source
Expand description

§SwimOS Agent Protocol

This crate defines the protocol used to communicate between the Swim runtime and implementations of agents.

The root module contains types describing the messages that can be sent on the various types of channel between the runtime and the agent. Each message type has encoders and decoders in the encoding module. Encoders/decoders whose name starts with ‘Raw’ send and receive raw arrays of bytes as the content of the message. Otherwise, the body should be any type that can be serialized to Recon, using the swimos_form::Form trait.

Modules§

encoding
Tokio encoders and decoders for the agent protocols.
peeling
Utility functions to parse the header of the Recon representation of a MapMessage.

Structs§

DownlinkOperation
Message type for communication from a downlink subscriber to the runtime.
StoreInitialized
The message sent to the runtime by a store when it has been successfully initialized.
StoreResponse
Message type for an agent to notify the runtime of a change to the state of store.

Enums§

CommandMessage
Message type for agents to send commands to the runtime.
DownlinkNotification
Message type for communication from the runtime to a downlink subscriber.
LaneRequest
Message type for communication between the agent runtime and agent implementation.
LaneResponse
Message type for communication from the agent implementation to the agent runtime.
MapMessage
Representation of map lane messages (used to form the body of Recon messages when operating) on downlinks. This extends MapOperation with Take (retain the first n items) and Drop (remove the first n items).
MapOperation
An operation that can be applied to a map lane. This type is used by map uplinks and downlinks to describe alterations to the lane.
StoreInitMessage
Message type used by the runtime the initialize the state of a store when an agent starts.

Type Aliases§

MapLaneResponse
MapStoreResponse