Documentation
¶
Overview ¶
Package service contains all of the code for the example agents services.
Index ¶
Constants ¶
const ( // LinuxConfigPath is the default path to agent configuration file on linux. LinuxConfigPath = `/etc/google-cloud-example-agent/configuration.json` // WindowsConfigPath is the default path to agent configuration file on windows. WindowsConfigPath = `C:\Program Files\Google\google-cloud-example-agent\conf\configuration.json` )
Variables ¶
This section is empty.
Functions ¶
func NewDaemonSubcommand ¶
NewDaemonSubcommand creates a new Command using the provided daemon for work.
func PopulateDaemonFlagValues ¶
PopulateDaemonFlagValues uses the provided flags to set the daemon's primitive values.
Types ¶
type Daemon ¶
type Daemon struct { Integration *cpb.Integration // contains filtered or unexported fields }
Daemon has args for daemon subcommand.
func NewDaemon ¶
func NewDaemon(lp log.Parameters, cloudProps *cpb.CloudProperties, integration *cpb.Integration) *Daemon
NewDaemon creates a new Daemon.
type Fast ¶
type Fast struct {
// contains filtered or unexported fields
}
Fast implements the Service interface for the fast service.
func (*Fast) ExpectedMinDuration ¶
ExpectedMinDuration returns the expected minimum duration for the fast service. Used by the recovery handler to determine if the service ran long enough to be considered successful.
type Service ¶
type Service interface { Start(ctx context.Context, a any) String() string ErrorCode() int ExpectedMinDuration() time.Duration }
Service defines the common interface for integration services. Start method is used to start the integration services.
type Slow ¶
type Slow struct {
// contains filtered or unexported fields
}
Slow implements the Service interface for the slow service.
func (*Slow) ExpectedMinDuration ¶
ExpectedMinDuration returns the expected minimum duration for the slow service. Used by the recovery handler to determine if the service ran long enough to be considered successful.