Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
Types ¶
type App ¶
type App struct { Log *zap.Logger LogLevel zap.AtomicLevel GRPCLogLevel zap.AtomicLevel AgentMeta *entity.AgentMeta AgentID *ValueHolder[int64] GitLabExternalURL *ValueHolder[url.URL] // KASAddress specifies the address of kas. KASAddress string KASCACertFile string KASHeaders []string KASSkipTLSVerify bool KASTLSServerName string ServiceAccountName string ObservabilityListenNetwork string ObservabilityListenAddress string ObservabilityCertFile string ObservabilityKeyFile string TokenFile string AgentToken api.AgentToken K8sClientGetter genericclioptions.RESTClientGetter }
type CancelRunWhenLeaderFunc ¶ added in v16.2.0
type CancelRunWhenLeaderFunc func()
type LeaderElector ¶
type ModuleStartFunc ¶ added in v16.2.0
type ModuleStartFunc func()
type ModuleStopFunc ¶ added in v16.2.0
type ModuleStopFunc func() ModuleStopWaitFunc
type ModuleStopWaitFunc ¶ added in v16.2.0
type Runner ¶
type Runner interface { // RunWhenLeader registers the given start and stop functions for this module with the leader runner. // When the leader runner is elected as the leader it will execute the start function and // when the leader runner lost the leadership it will execute the stop function. // The start function must be able to be triggered multiple times (with intermediate stop executions) // without having to rely on a new agent configuration. // The function that is returned must be used to unregister the module // from the leader runner in case a shutdown is initiated or a previously registered start function // became invalid, for example because a new agent configuration turned out to be invalid. RunWhenLeader(ctx context.Context, startFn ModuleStartFunc, stopFunc ModuleStopFunc) (CancelRunWhenLeaderFunc, error) }
type ValueHolder ¶ added in v16.1.0
type ValueHolder[T comparable] struct { // contains filtered or unexported fields }
ValueHolder holds agent id of this agentk.
func NewValueHolder ¶ added in v16.1.0
func NewValueHolder[T comparable]() *ValueHolder[T]
Click to show internal directories.
Click to hide internal directories.