Documentation
¶
Overview ¶
Package agent provides domain models for the agent
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶ added in v0.0.15
type Capabilities uint64
Capabilities is a bitmask of capabilities that the Agent supports. The Capabilities enum is defined in the opamp protocol.
func (*Capabilities) Has ¶ added in v0.0.15
func (a *Capabilities) Has(capability Capability) bool
Has checks if the AgentCapabilities has a specific capability.
func (*Capabilities) HasReportsStatus ¶ added in v0.0.15
func (a *Capabilities) HasReportsStatus() bool
HasReportsStatus checks if the AgentCapabilities has the ReportsStatus capability.
type Capability ¶ added in v0.0.15
type Capability uint64
Capability is a helper type to represent the capabilities of the Agent. It is used to define the capabilities of the Agent in a more readable way.
const ( // AgentCapabilityUnspecified represents that // The capabilities field is unspecified. AgentCapabilityUnspecified Capability = 0 // AgentCapabilityReportsStatus represents that // The Agent can report status. This bit MUST be set, since all Agents MUST // report status. AgentCapabilityReportsStatus Capability = 1 // AgentCapabilityAcceptsRemoteConfig represents that // The Agent can accept remote configuration from the Server. AgentCapabilityAcceptsRemoteConfig Capability = 2 // AgentCapabilityReportsEffectiveConfig represents that // The Agent will report EffectiveConfig in AgentToServer. AgentCapabilityReportsEffectiveConfig Capability = 4 // AgentCapabilityAcceptsPackages represents that // The Agent can accept package offers. // Status: [Beta]. AgentCapabilityAcceptsPackages Capability = 8 // AgentCapabilityReportsPackageStatuses represents that // The Agent can report package status. // Status: [Beta]. AgentCapabilityReportsPackageStatuses Capability = 16 // AgentCapabilityReportsOwnTraces represents that // The Agent can report own trace to the destination specified by // the Server via ConnectionSettingsOffers.own_traces field. // Status: [Beta]. AgentCapabilityReportsOwnTraces Capability = 32 // AgentCapabilityReportsOwnMetrics represents that // The Agent can report own metrics to the destination specified by // the Server via ConnectionSettingsOffers.own_metrics field. // Status: [Beta]. AgentCapabilityReportsOwnMetrics Capability = 64 // AgentCapabilityReportsOwnLogs represents that // The Agent can report own logs to the destination specified by // the Server via ConnectionSettingsOffers.own_logs field. // Status: [Beta]. AgentCapabilityReportsOwnLogs Capability = 128 // AgentCapabilityAcceptsOpAMPConnectionSettings represents that // The can accept connections settings for OpAMP via // ConnectionSettingsOffers.opamp field. // Status: [Beta]. AgentCapabilityAcceptsOpAMPConnectionSettings Capability = 256 // AgentCapabilityAcceptsOtherConnectionSettings represents that // The can accept connections settings for other destinations via // ConnectionSettingsOffers.other_connections field. // Status: [Beta]. AgentCapabilityAcceptsOtherConnectionSettings Capability = 512 // AgentCapabilityAcceptsRestartCommand represents that // The Agent can accept restart requests. // Status: [Beta]. AgentCapabilityAcceptsRestartCommand Capability = 1024 // AgentCapabilityReportsHealth represents that // The Agent will report Health via AgentToServer.health field. AgentCapabilityReportsHealth Capability = 2048 // AgentCapabilityReportsRemoteConfig represents that // The Agent will report RemoteConfig status via AgentToServer.remote_config_status field. AgentCapabilityReportsRemoteConfig Capability = 4096 // AgentCapabilityReportsHeartbeat represents that // The Agent can report heartbeats. // This is specified by the ServerToAgent.OpAMPConnectionSettings.heartbeat_interval_seconds field. // If this capability is true, but the Server does not set a heartbeat_interval_seconds field, the // Agent should use its own configured interval, which by default will be 30s. The Server may not // know the configured interval and should not make assumptions about it. // Status: [Development]. AgentCapabilityReportsHeartbeat Capability = 8192 // AgentCapabilityReportsAvailableComponents represents that // The agent will report AvailableComponents via the AgentToServer.available_components field. // Status: [Development]. AgentCapabilityReportsAvailableComponents Capability = 16384 )
type Description ¶
type Description struct {
IdentifyingAttributes map[string]string
NonIdentifyingAttributes map[string]string
}
Description represents the description of an agent. It contains identifying and non-identifying attributes.
func (*Description) OS ¶
func (ad *Description) OS() vo.OS
OS is a required field of AgentDescription https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#agentdescriptionnon_identifying_attributes
func (*Description) Service ¶
func (ad *Description) Service() vo.Service
Service returns service information.