Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Cmd string `json:"cmd"` // e.g., "conn.close"
Args map[string]string `json:"args"` // e.g., {"conn_id": "123", "reason": "timeout"}
Src string `json:"src"` // e.g., "codec_iso8583"
}
Command matches the JSON schema defined in ADR 0020.
type ControlPlane ¶
type ControlPlane interface {
// Publish sends a command to a specific target gear.
Publish(targetGearID string, cmd Command) error
// Subscribe listens for commands targeting this gear.
Subscribe(myGearID string) (<-chan Command, error)
}
ControlPlane defines the interface for signaling.
type NATSControlPlane ¶
type NATSControlPlane struct {
// contains filtered or unexported fields
}
NATSControlPlane implements ControlPlane using NATS.
func NewNATSControlPlane ¶
func NewNATSControlPlane(nc *nats.Conn) *NATSControlPlane
NewNATSControlPlane creates a new instance.
Click to show internal directories.
Click to hide internal directories.