Documentation ¶
Overview ¶
Package observiq contains OpAmp structures compatible with the observiq client
Package observiq contains OpAmp structures compatible with the observiq client
Index ¶
- Constants
- Variables
- func NewClient(args *NewClientArgs) (opamp.Client, error)
- type AgentConfigManager
- func (a *AgentConfigManager) AddConfig(configName string, managedConfig *opamp.ManagedConfig)
- func (a *AgentConfigManager) ApplyConfigChanges(remoteConfig *protobufs.AgentRemoteConfig) (changed bool, returnErr error)
- func (a *AgentConfigManager) ComposeEffectiveConfig() (*protobufs.EffectiveConfig, error)
- type Client
- type DownloadableFileManager
- type MeasurementsReporter
- type NewClientArgs
Constants ¶
const ( // CollectorConfigName is the key of the collector config in OpAmp CollectorConfigName = "collector.yaml" // ManagerConfigName is the key of the manager config in OpAmp ManagerConfigName = "manager.yaml" // LoggingConfigName is the key of the logging config in OpAmp LoggingConfigName = "logging.yaml" // ReportConfigName is the key of the report config in OpAmp ReportConfigName = "report.yaml" )
Variables ¶
var ( // ErrUnsupportedURL is error returned when creating a client with an unsupported URL scheme ErrUnsupportedURL = errors.New("unsupported URL") )
Functions ¶
Types ¶
type AgentConfigManager ¶
type AgentConfigManager struct {
// contains filtered or unexported fields
}
AgentConfigManager keeps track of active configs for the agent
func NewAgentConfigManager ¶
func NewAgentConfigManager(defaultLogger *zap.Logger) *AgentConfigManager
NewAgentConfigManager creates a new AgentConfigManager
func (*AgentConfigManager) AddConfig ¶
func (a *AgentConfigManager) AddConfig(configName string, managedConfig *opamp.ManagedConfig)
AddConfig adds a config to be tracked by the config manager. If the config already is tracked it'll be overwritten with the new managed config
func (*AgentConfigManager) ApplyConfigChanges ¶
func (a *AgentConfigManager) ApplyConfigChanges(remoteConfig *protobufs.AgentRemoteConfig) (changed bool, returnErr error)
ApplyConfigChanges compares the remoteConfig to the existing and applies changes
func (*AgentConfigManager) ComposeEffectiveConfig ¶
func (a *AgentConfigManager) ComposeEffectiveConfig() (*protobufs.EffectiveConfig, error)
ComposeEffectiveConfig reads in all config files and calculates the effective config
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client that is connected to Iris via OpAmp
type DownloadableFileManager ¶
type DownloadableFileManager struct {
// contains filtered or unexported fields
}
DownloadableFileManager handles DownloadableFile's from a PackagesAvailable message
func (DownloadableFileManager) CleanupArtifacts ¶
func (m DownloadableFileManager) CleanupArtifacts()
CleanupArtifacts removes previous installation artifacts by removing the temporary directory.
func (DownloadableFileManager) FetchAndExtractArchive ¶
func (m DownloadableFileManager) FetchAndExtractArchive(file *protobufs.DownloadableFile) error
FetchAndExtractArchive fetches the archive at the specified URL, placing it into dir. It then checks to see if it matches the "expectedHash", a hex-encoded string representing the expected sha256 sum of the file. If it matches, the archive is extracted into the $dir/latest directory. If the archive cannot be extracted, downloaded, or verified, then an error is returned.
type MeasurementsReporter ¶ added in v1.59.0
type MeasurementsReporter interface {
OTLPMeasurements(extraAttributes map[string]string) pmetric.Metrics
}
MeasurementsReporter represents an object that reports throughput measurements as OTLP.
type NewClientArgs ¶
type NewClientArgs struct { DefaultLogger *zap.Logger Config opamp.Config Collector collector.Collector Version string TmpPath string ManagerConfigPath string CollectorConfigPath string LoggerConfigPath string MeasurementsReporter MeasurementsReporter }
NewClientArgs arguments passed when creating a new client