Documentation
¶
Index ¶
- func Encode(kind MessageKind, payload any) ([]byte, error)
- func GenerateNodeID(appPrefix string) (string, error)
- type CPUMetrics
- type Capability
- type DiskMetrics
- type DiskPartition
- type Envelope
- type ExecutorRegisteredResult
- type ExecutorRegistration
- type JoinPacket
- type LoadMetrics
- type MemoryMetrics
- type MessageKind
- type NetworkInterface
- type NetworkMetrics
- type RiskLevel
- type TaskRequest
- type TaskResult
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNodeID ¶
Types ¶
type CPUMetrics ¶
type Capability ¶
type DiskMetrics ¶
type DiskMetrics struct {
Partitions []DiskPartition `json:"partitions"`
}
type DiskPartition ¶
type Envelope ¶
type Envelope struct {
Kind MessageKind `json:"kind"`
Payload json.RawMessage `json:"payload"`
}
type ExecutorRegisteredResult ¶
type ExecutorRegisteredResult struct {
CorrelationID string `json:"correlation_id,omitempty"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
}
ExecutorRegisteredResult is the response payload for KindExecutorRegistered.
type ExecutorRegistration ¶
type ExecutorRegistration struct {
Kind string `json:"kind"`
Version string `json:"version"`
Runtime string `json:"runtime"` // bash | python | powershell
Script string `json:"script"`
Platforms []string `json:"platforms"`
Risk RiskLevel `json:"risk"`
RequiresElevation bool `json:"requires_elevation"`
Warning string `json:"warning,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
}
type JoinPacket ¶
type LoadMetrics ¶
type MemoryMetrics ¶
type MessageKind ¶
type MessageKind string
const ( KindJoinAccepted MessageKind = "join.accepted" KindTaskRequest MessageKind = "task.request" KindTaskResult MessageKind = "task.result" KindExecutorRegister MessageKind = "executor.register" KindExecutorRegistered MessageKind = "executor.registered" )
type NetworkInterface ¶
type NetworkMetrics ¶
type NetworkMetrics struct {
Interfaces []NetworkInterface `json:"interfaces"`
}
type TaskRequest ¶
type TaskRequest struct {
TaskID string `json:"task_id"`
Kind string `json:"kind"`
Params json.RawMessage `json:"params"`
}
type TaskResult ¶
type TaskResult struct {
TaskID string `json:"task_id"`
Success bool `json:"success"`
Output json.RawMessage `json:"output,omitempty"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.