agent

package
v1.1.68-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Id           string       `json:"id,omitzero" validate:"uuid,readOnly"`
	Name         base.Name    `json:"name,omitzero"`
	Kind         base.Kind    `json:"kind,omitzero"`
	Version      *float64     `json:"version,omitzero" validate:"positive,integer,readOnly"`
	Description  string       `json:"description,omitzero" validate:"trim,max=250,allow="`
	Tags         AgentTags    `json:"tags,omitzero" validate:"default={}"`
	Created      string       `json:"created,omitzero" validate:"date,readOnly"`
	LastModified string       `json:"lastModified,omitzero" validate:"date,readOnly"`
	Links        base.Links   `json:"links,omitzero" validate:"readOnly"`
	Status       *AgentStatus `json:"status,omitzero"`
}

func (Agent) ValidationRule

func (Agent) ValidationRule() *validate.Rule

ValidationRule reflects Agent.

type AgentInfo

type AgentInfo struct {
	ProtocolVersion AgentInfoProtocolVersion `json:"protocolVersion,omitzero"`
	InstanceId      string                   `json:"instanceId,omitzero"`
	LastActive      string                   `json:"lastActive,omitzero" validate:"date,iso"`
	Env             AgentInfoEnv             `json:"env,omitzero"`
	PeerCount       *float64                 `json:"peerCount,omitzero" validate:"positive,integer"`
	ServiceCount    *float64                 `json:"serviceCount,omitzero" validate:"positive,integer"`
}

func (AgentInfo) ValidationRule

func (AgentInfo) ValidationRule() *validate.Rule

ValidationRule reflects the -info beat payload (validated by the -info route).

type AgentInfoEnv

type AgentInfoEnv map[string]any

type AgentInfoProtocolVersion

type AgentInfoProtocolVersion string
const (
	AgentInfoProtocolVersionV1 AgentInfoProtocolVersion = "v1"
	AgentInfoProtocolVersionV2 AgentInfoProtocolVersion = "v2"
)

func (AgentInfoProtocolVersion) EnumValues

func (AgentInfoProtocolVersion) EnumValues() []string

type AgentStatus

type AgentStatus struct {
	BootstrapConfig *BootstrapConfig           `json:"bootstrapConfig,omitzero"`
	ProtocolVersion AgentStatusProtocolVersion `json:"protocolVersion,omitzero"`
}

type AgentStatusProtocolVersion

type AgentStatusProtocolVersion string
const (
	AgentStatusProtocolVersionV1 AgentStatusProtocolVersion = "v1"
	AgentStatusProtocolVersionV2 AgentStatusProtocolVersion = "v2"
)

func (AgentStatusProtocolVersion) EnumValues

func (AgentStatusProtocolVersion) EnumValues() []string

type AgentTags

type AgentTags = base.Tags

AgentTags aliases base.Tags so the reflection base-type registry resolves it to the shared TagsRule.

type BootstrapConfig

type BootstrapConfig struct {
	RegistrationToken string                         `json:"registrationToken" validate:"required"`
	AgentId           string                         `json:"agentId" validate:"required"`
	AgentLink         string                         `json:"agentLink" validate:"required"`
	HubEndpoint       HttpHttpsUri                   `json:"hubEndpoint" validate:"required"`
	ProtocolVersion   BootstrapConfigProtocolVersion `json:"protocolVersion,omitzero"`
}

type BootstrapConfigProtocolVersion

type BootstrapConfigProtocolVersion string
const (
	BootstrapConfigProtocolVersionV1 BootstrapConfigProtocolVersion = "v1"
	BootstrapConfigProtocolVersionV2 BootstrapConfigProtocolVersion = "v2"
)

func (BootstrapConfigProtocolVersion) EnumValues

func (BootstrapConfigProtocolVersion) EnumValues() []string

type HttpHttpsUri

type HttpHttpsUri string

HttpHttpsUri is a URI restricted to the http/https schemes — the strongly-typed replacement for the `uri,custom=uriHttpHttps` tag (Joi.string().uri({scheme: ['http','https']})).

func (HttpHttpsUri) ValidationRule

func (HttpHttpsUri) ValidationRule() *validate.Rule

ValidationRule ports agent.ts:9 `Joi.string().uri({scheme:['http','https']})`. Joi reports string.uriCustomScheme for EVERY failure once a scheme option is present — including a value that is not a URI at all — so the .URI() rule cannot run first (it answered string.uri for "not a uri" where TS answers string.uriCustomScheme). The scheme list renders as Joi's alternation ("http|https"), not as Go's [http https], and the message quotes the LABEL, not the value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL