Skip to main content

forge_worker_sdk/protocol/
mod.rs

1//! Wire protocol types shared with the Go Forge supervisor.
2
3mod control;
4mod envelope;
5
6pub use control::{
7    decode_pong_payload, CancelJobParams, CapabilitiesResponse, HealthResponse, JobStatusParams,
8    PongPayload,
9};
10pub use envelope::{WireEvent, WireRequest, WireResponse};
11
12use serde::{Deserialize, Serialize};
13
14/// Go: `ErrorPayload` in `go/transport`.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct ErrorPayload {
17    pub code: String,
18    pub message: String,
19    #[serde(default, skip_serializing_if = "String::is_empty")]
20    pub detail: String,
21}