Documentation
¶
Overview ¶
Package agentclient provides an interface to run Agent commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent interface {
// Version runs version command returns the runtime Agent version
Version(commandArgs ...AgentArgsOption) string
// Hostname runs hostname command and returns the runtime Agent hostname
Hostname(commandArgs ...AgentArgsOption) string
// Check runs check command and returns the runtime Agent check
Check(commandArgs ...AgentArgsOption) string
// Check runs check command and returns the runtime Agent check or an error
CheckWithError(commandArgs ...AgentArgsOption) (string, error)
// Config runs config command and returns the runtime agent config
Config(commandArgs ...AgentArgsOption) string
// ConfigWithError runs config command and returns the runtime agent config or an error
ConfigWithError(commandArgs ...AgentArgsOption) (string, error)
// Diagnose runs diagnose command and returns its output
Diagnose(commandArgs ...AgentArgsOption) string
// Flare runs flare command and returns the output. You should use the FakeIntake client to fetch the flare archive
Flare(commandArgs ...AgentArgsOption) string
// FlareWithError runs flare command and returns the output and error, if any. You should use the FakeIntake client to fetch the flare archive
FlareWithError(commandArgs ...AgentArgsOption) (string, error)
// Health runs health command and returns the runtime agent health
Health() (string, error)
// ConfigCheck runs configcheck command and returns the runtime agent configcheck
ConfigCheck(commandArgs ...AgentArgsOption) string
// Integration run integration command and returns the output
Integration(commandArgs ...AgentArgsOption) string
// IntegrationWithError run integration command and returns the output
IntegrationWithError(commandArgs ...AgentArgsOption) (string, error)
// RemoteConfig runs the remote-config command and returns the output
RemoteConfig(commandArgs ...AgentArgsOption) string
// Secret runs the secret command
Secret(commandArgs ...AgentArgsOption) string
// IsReady runs status command and returns true if the command returns a zero exit code.
// This function should rarely be used.
IsReady() bool
// Status runs status command and returns a Status struct
Status(commandArgs ...AgentArgsOption) *Status
// StatusWithError runs status command and returns a Status struct and error
StatusWithError(commandArgs ...AgentArgsOption) (*Status, error)
// JMX run the jmx command and returns a Status struct and error
JMX(commandArgs ...AgentArgsOption) (*Status, error)
// WorkloadList runs the workload-list command and returns the output
WorkloadList() (*Status, error)
}
Agent is an interface to run Agent command.
type AgentArgs ¶
type AgentArgs struct {
Args []string
}
AgentArgs contains the arguments for the Agent commands. Its value is populated using the functional options pattern.
type AgentArgsOption ¶
AgentArgsOption is an optional function parameter type for Agent arguments
Click to show internal directories.
Click to hide internal directories.