# Packages

No description provided by the author
No description provided by the author

# Functions

New creates a client connection to Elastic Agent.
NewFromReader creates a new client reading the connection information from the io.Reader.
NewV2 creates a client connection to Elastic Agent over the V2 control protocol.
NewV2FromReader creates a new V2 client reading the connection information from the io.Reader.
WithAgentInfo sets the AgentInfo and updates the client's VersionInfo.Version to match the given agentInfo.Version.
WithChunking sets if the client can use chunking with the server.
WithGRPCDialOptions allows the setting of GRPC dial options.
WithMaxMessageSize sets the maximum message size.

# Constants

ActionResponseInitID is the initial ID sent to Agent on first connect.
CheckinMinimumTimeout is the amount of time the client must send a new checkin even if the status has not changed.
copied from the gRPC default.
InitialConfigIdx is the initial configuration index the client starts with.
ServiceArtifact artifact service is available.
ServiceCheckin V1 checkin service is available.
ServiceCheckinV2 V2 checkin service is available.
ServiceLog log service is available.
ServiceStore store service is available.
apm_config_change_triggered.
config_change_triggered.
feature_change_triggered.
log_level_triggered.
nothing_triggered.
state_change_triggered.
unit_added.
unit_modified.
unit_removed.
UnitLogLevelDebug is when the unit should log at debug level.
UnitLogLevelError is when the unit should log at error level.
UnitLogLevelInfo is when the unit should log at info level.
UnitLogLevelTrace is when the unit should log at trace level.
UnitLogLevelWarn is when the unit should log at warn level.
UnitStateConfiguring is when a unit is currently configuring.
UnitStateDegraded is when the unit is working but not exactly as its expected.
UnitStateFailed is when the unit is completely broken and failing to work.
UnitStateHealthy is when the unit is working exactly as it should.
UnitStateStarting is when a unit is starting.
UnitStateStopped is when the unit is stopped.
UnitStateStopping is when the unit is stopping.
UnitTypeInput is an input unit.
UnitTypeOutput is an output unit.

# Variables

ActionErrInvalidParams is returned to Elastic Agent as result to an action request when the request params are invalid for the action.
ActionErrUndefined is returned to Elastic Agent as result to an action request when the request action is not registered in the client.
ActionErrUnitNotFound is returned to Elastic Agent as result to an action request when the request action unit cannot be found.
ActionErrUnmarshableParams is returned to Elastic Agent as result to an action request when the request params could not be un-marshaled to send to the action.
ActionErrUnmarshableResult is returned to Elastic Agent as result to an action request when the action was performed but the response could not be marshalled to send back to the agent.
ActionTypeUnknown is returned to Elastic Agent as result to an action request where the action type is unknown.
ErrStoreTxBroken is an error when an action on a transaction has failed causing the whole transaction to be broken.
ErrStoreTxCommitted is an error action is performed on an already committed transaction.
ErrStoreTxDiscarded is an error when Commit is called on an already discarded transaction.
ErrStoreTxReadOnly is an error when write actions are performed on a read-only transaction.
ErrV2Unavailable error returned when Elastic Agent doesn't support V2.

# Structs

AgentInfo is the information about the running Elastic Agent that the client is connected to.
DiagnosticParams is an optional JSON field that can be sent in the `params` field of a diagnostic action request.
Expected contains the expected state, log level, features and config for a unit.
Unit represents a distinct item that needs to be operating with-in this process.
UnitChanged is what is sent over the UnitChanged channel any time a change happens: - a unit is added, modified, or removed - a feature changes.
VersionInfo is the version information for the connecting client.

# Interfaces

Action is an action the client exposed to the Elastic Agent.
ArtifactsClient provides Fetch that allows artifacts to be fetched from the artifact store.
Client manages the state and communication to the Elastic Agent.
LogClient provides Log that allows a message to be logged by Elastic Agent.
StateInterface defines how to handle config and stop requests.
StoreClient provides access to the key-value store from Elastic Agent for this unit.
StoreTxClient provides actions allowed for a started transaction.
V2 manages the state and communication to the Elastic Agent over the V2 control protocol.

# Type aliases

DiagnosticHook is a function that returns content for a registered diagnostic hook.
Service defined different services that the Elastic Agent states is available.
No description provided by the author
No description provided by the author
UnitLogLevel is the log level the unit should run at.
UnitState is the state for the unit, used both for expected and observed state.
UnitType is the type of the unit, either input or output.
V2ClientOption is an option that can be used when creating the client.