pub enum Message {
Show 31 variants
Ping {
version: u64,
},
Pong {
mac: String,
version: u64,
},
Auth {
token: String,
worker_id: Option<String>,
worker_name: Option<String>,
},
Join {
token: String,
},
AuthOk,
AuthErr,
TokenRefreshRequest {
token: String,
},
TokenRefreshOk {
token: String,
},
TokenRefreshErr {
reason: String,
},
Hello {
manager_id: String,
nonce: [u8; 32],
sig: Vec<u8>,
},
Welcome {
manager_id: String,
nonce: [u8; 32],
sig: Vec<u8>,
},
ClusterKey {
ver: u32,
csk: [u8; 32],
},
JoinResponse {
ver: u32,
csk: [u8; 32],
peer: Box<ManagerPeerEntry>,
},
ClientAuth {
token: String,
},
ClientCommandRequest {
request_id: String,
command: String,
args: Vec<String>,
target: String,
timeout_secs: u64,
options: String,
},
ClientCommandResponse {
request_id: String,
worker_id: String,
worker_name: Option<String>,
success: bool,
duration_millis: u64,
output: String,
},
ClientCommandHeader {
request_id: String,
worker_id: String,
worker_name: Option<String>,
payload: Vec<u8>,
},
ClientCommandStream {
request_id: String,
worker_id: String,
worker_name: Option<String>,
payload: Vec<u8>,
},
ClientCommandFooter {
request_id: String,
worker_id: String,
worker_name: Option<String>,
payload: Vec<u8>,
duration_millis: u64,
success: bool,
},
ClientCommandComplete {
request_id: String,
total_workers: u32,
},
ClientCommandError {
request_id: String,
error: String,
},
ClientCommandCancel {
request_id: String,
},
WorkerCommandRequest {
request_id: String,
command: String,
args: Vec<String>,
timeout_secs: u64,
options: String,
},
WorkerCommandResponse {
request_id: String,
worker_id: String,
success: bool,
duration_millis: u64,
output: String,
},
WorkerCommandHeader {
request_id: String,
worker_id: String,
payload: Vec<u8>,
},
WorkerCommandStream {
request_id: String,
worker_id: String,
payload: Vec<u8>,
},
WorkerCommandFooter {
request_id: String,
worker_id: String,
payload: Vec<u8>,
duration_millis: u64,
success: bool,
},
WorkerCommandError {
request_id: String,
error: String,
},
WorkerCommandCancel {
request_id: String,
},
Announce {
meta: Box<ManagerPeerEntry>,
version: u64,
peers: Vec<ManagerPeerEntry>,
workers: Vec<WorkerEntry>,
},
Goodbye,
}Expand description
Basic message type used between worker and server.
Variants§
Ping
Pong
Auth
Join
AuthOk
AuthErr
TokenRefreshRequest
TokenRefreshOk
TokenRefreshErr
Hello
Welcome
ClusterKey
JoinResponse
Join response with cluster key and peer info
ClientAuth
Client authentication using cluster keys
ClientCommandRequest
Client command request for distributed execution
Fields
ClientCommandResponse
Client command response
Fields
ClientCommandHeader
Client streaming: header frame (manager -> client)
ClientCommandStream
Client streaming: progress frame (manager -> client)
Client streaming: footer/completion frame per worker (manager -> client)
ClientCommandComplete
Client command completion
ClientCommandError
Client command error
ClientCommandCancel
Client command cancel request
WorkerCommandRequest
Worker command request (manager -> worker)
WorkerCommandResponse
Worker command response with results (worker -> manager)
WorkerCommandHeader
Worker streaming header (binary payload of CommandHeader)
WorkerCommandStream
Worker streaming frame (binary payload of CommandStream)
Worker streaming footer (binary payload of CommandFooter)
WorkerCommandError
Worker command error (worker -> manager)
WorkerCommandCancel
Cancel a running command on a worker (manager -> worker)
Announce
Manager heartbeat and peer list gossip.
version is a monotonically increasing counter for the sender’s
peer table. peers contains the full list of known peers when
version has advanced since the last heartbeat; otherwise it may
be empty to indicate no changes.
Fields
meta: Box<ManagerPeerEntry>peers: Vec<ManagerPeerEntry>workers: Vec<WorkerEntry>List of known workers when version has advanced. Empty otherwise.
Goodbye
Worker indicates it is intentionally closing this session (e.g., after migration)