Documentation
¶
Overview ¶
Package daemon implements the fleet long running daemon.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Message string `json:"message"`
}
APIError is an error response.
type APIResponse ¶
type APIResponse struct {
Error *APIError `json:"error,omitempty"`
}
APIResponse is the response to an API request.
type APMInjectionStatus ¶
type APMInjectionStatus struct {
HostInstrumented bool `json:"host_instrumented"`
DockerInstalled bool `json:"docker_installed"`
DockerInstrumented bool `json:"docker_instrumented"`
}
APMInjectionStatus contains the instrumentation status of the APM injection.
type Daemon ¶
type Daemon interface {
Start(ctx context.Context) error
Stop(ctx context.Context) error
SetCatalog(c catalog)
SetConfigCatalog(configs map[string]installerConfig)
Install(ctx context.Context, url string, args []string) error
Remove(ctx context.Context, pkg string) error
StartExperiment(ctx context.Context, url string) error
StopExperiment(ctx context.Context, pkg string) error
PromoteExperiment(ctx context.Context, pkg string) error
StartConfigExperiment(ctx context.Context, pkg string, operations config.Operations, encryptedSecrets map[string]string) error
StopConfigExperiment(ctx context.Context, pkg string) error
PromoteConfigExperiment(ctx context.Context, pkg string) error
GetPackage(pkg string, version string) (Package, error)
GetState(ctx context.Context) (map[string]PackageState, error)
GetRemoteConfigState() *pbgo.ClientUpdater
GetAPMInjectionStatus() (APMInjectionStatus, error)
}
Daemon is the fleet daemon in charge of remote install, updates and configuration.
func NewDaemon ¶
func NewDaemon(hostname string, rcFetcher client.ConfigFetcher, config agentconfig.Reader) (Daemon, error)
NewDaemon returns a new daemon.
type LocalAPI ¶
LocalAPI is the interface for the locally exposed API to interact with the daemon.
func NewLocalAPI ¶
NewLocalAPI returns a new LocalAPI.
type LocalAPIClient ¶
type LocalAPIClient interface {
Status() (StatusResponse, error)
SetCatalog(catalog string) error
SetConfigCatalog(configs string) error
Install(pkg, version string) error
Remove(pkg string) error
StartExperiment(pkg, version string) error
StopExperiment(pkg string) error
PromoteExperiment(pkg string) error
StartConfigExperiment(pkg, operations string, encryptedSecrets map[string]string) error
StopConfigExperiment(pkg string) error
PromoteConfigExperiment(pkg string) error
}
LocalAPIClient is a client to interact with the locally exposed daemon API.
func NewLocalAPIClient ¶
func NewLocalAPIClient() LocalAPIClient
NewLocalAPIClient returns a new LocalAPIClient.
type Package ¶
type Package struct {
Name string `json:"package"`
Version string `json:"version"`
SHA256 string `json:"sha256"`
URL string `json:"url"`
Size int64 `json:"size"`
Platform string `json:"platform"`
Arch string `json:"arch"`
}
Package represents a downloadable package.
type PackageState ¶
type PackageState struct {
Version repository.State
Config repository.State
}
PackageState represents a package state.
type StatusResponse ¶
type StatusResponse struct {
APIResponse
RemoteConfigState []*pbgo.PackageState `json:"remote_config_state"`
SecretsPubKey string `json:"secrets_pub_key"`
}
StatusResponse is the response to the status endpoint.