Versions in this module Expand all Collapse all v0 v0.3.0 Nov 27, 2026 Changes in this version + var ErrNotFound = errors.New("agent not found") + var ErrState = errors.New("agent is not in a state that allows it") + var Group = endpoint.Register(...) + func Drain(ctx context.Context, d Deps, in DrainInput) (struct{}, error) + func Undrain(ctx context.Context, d Deps, in UndrainInput) (struct{}, error) + type Admissions interface + Get func(ctx context.Context, machineID string) (admission.Record, error) + type ConfigGetInput struct + Hostname string + type ConfigRequest struct + FactsInterval string + Labels map[string]string + LogLevel types.LogLevel + MaxJobs int + type ConfigResponse struct + FactsInterval string + Labels map[string]string + LogLevel types.LogLevel + MaxJobs int + UpdatedAt *time.Time + Version int + func GetConfig(ctx context.Context, d Deps, in ConfigGetInput) (ConfigResponse, error) + func SetConfig(ctx context.Context, d Deps, in ConfigSetInput) (ConfigResponse, error) + type ConfigSetInput struct + Body ConfigRequest + Hostname string + type Deps struct + Admissions Admissions + Jobs Jobs + Joiner Joiner + type DrainInput struct + Hostname string + type FactKeyEntry struct + Builtin bool + Description string + Key string + type FactKeysResponse struct + Items []FactKeyEntry + TotalItems int + func Facts(_ context.Context, _ Deps, _ FactsInput) (FactKeysResponse, error) + type FactsInput struct + type GetInput struct + Hostname string + type Info struct + Architecture string + CPUCount int + Conditions []NodeCondition + ConfigBehind bool + ConfigVersion int + ConfigWanted int + ControllerKey string + ControllerKeyNext string + FQDN string + Facts map[string]any + Fingerprint string + Hostname string + Interfaces []NetworkInterfaceResponse + KernelVersion string + KeyStored *bool + Labels map[string]string + LoadAverage *LoadAverageResponse + MachineID string + Memory *MemoryResponse + MissingPrograms []string + NATSCertNext string + OSInfo *OSInfoResponse + PackageMgr string + PrimaryInterface string + RegisteredAt time.Time + Routes []RouteResponse + ServiceMgr string + StartedAt time.Time + State types.AgentState + Timeline []TimelineEvent + Uptime string + Verified *bool + Version string + func Get(ctx context.Context, d Deps, in GetInput) (Info, error) + type Jobs interface + DeleteDrainFlag func(ctx context.Context, hostname string) error + GetAgent func(ctx context.Context, hostname string) (*job.AgentInfo, error) + GetAgentConfig func(ctx context.Context, machineID string) (job.AgentConfig, error) + ListAgents func(ctx context.Context) ([]job.AgentInfo, error) + SetAgentConfig func(ctx context.Context, machineID string, set job.AgentConfig) (job.AgentConfig, error) + SetDrainFlag func(ctx context.Context, hostname string) error + WriteAgentTimelineEvent func(ctx context.Context, machineID, hostname, event, message string) error + type JoinInput struct + Body JoinRequest + type JoinRequest struct + EncryptionKey string + Hostname string + MachineID string + PublicKey string + Signature string + Token secret.Value + type JoinResponse struct + ControllerPublicKey string + func Join(ctx context.Context, d Deps, in JoinInput) (JoinResponse, error) + type Joiner interface + Join func(ctx context.Context, req pki.JoinRequest) (ed25519.PublicKey, error) + type ListAgentsResponse struct + Items []Info + TotalItems int + func List(ctx context.Context, d Deps, _ ListInput) (ListAgentsResponse, error) + type ListInput struct + type LoadAverageResponse struct + FifteenMin float32 + FiveMin float32 + OneMin float32 + type MemoryResponse struct + Free int + Total int + Used int + type Message = struct + Message string + type NetworkInterfaceResponse struct + Family types.AddressFamily + IPv4 string + IPv6 string + MAC string + Name string + type NodeCondition struct + LastTransitionTime time.Time + Reason string + Type types.ConditionType + type OSInfoResponse struct + Distribution string + Family string + Version string + type RouteResponse struct + Destination string + Gateway string + Interface string + Mask string + Metric int + type TimelineEvent struct + Error string + Event string + Hostname string + Message string + Timestamp time.Time + type UndrainInput struct + Hostname string