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§
- Downlink
Operation - Message type for communication from a downlink subscriber to the runtime.
- Store
Initialized - The message sent to the runtime by a store when it has been successfully initialized.
- Store
Response - Message type for an agent to notify the runtime of a change to the state of store.
Enums§
- Command
Message - Message type for agents to send commands to the runtime.
- Downlink
Notification - Message type for communication from the runtime to a downlink subscriber.
- Lane
Request - Message type for communication between the agent runtime and agent implementation.
- Lane
Response - 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
MapOperationwithTake(retain the firstnitems) andDrop(remove the firstnitems). - 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.
- Store
Init Message - Message type used by the runtime the initialize the state of a store when an agent starts.