daemon

package
v0.0.0-...-7370a3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package daemon implements daemon mode execution subcommand in Workload Agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDaemonSubCommand

func NewDaemonSubCommand(d *Daemon) *cobra.Command

NewDaemonSubCommand creates a new startdaemon subcommand.

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon has args for startdaemon subcommand.

func NewDaemon

func NewDaemon(lp log.Parameters, cloudProps *cpb.CloudProperties, serviceFactory ServiceFactoryFunc) *Daemon

NewDaemon creates a new Daemon.

func (*Daemon) Execute

func (d *Daemon) Execute(ctx context.Context) error

Execute runs the daemon command.

type Service

type Service interface {
	Start(ctx context.Context, a any)
	String() string
	ErrorCode() int
	ExpectedMinDuration() time.Duration
}

Service defines the common interface for workload services. Start methods are used to start the workload monitoring services.

type ServiceFactoryFunc

type ServiceFactoryFunc func(ctx context.Context, config *cpb.Configuration, cloudProps *cpb.CloudProperties, osData osinfo.Data, wlmClient workloadmanager.WLMWriter, dbcenterClient databasecenter.Client) ServiceSet

ServiceFactoryFunc is a function that creates a ServiceSet.

type ServiceSet

type ServiceSet struct {
	Services []Service
	Channels map[string]chan<- *servicecommunication.Message
}

ServiceSet groups services and their communication channels.

func DefaultServiceFactory

func DefaultServiceFactory(ctx context.Context, config *cpb.Configuration, cloudProps *cpb.CloudProperties, osData osinfo.Data, wlmClient workloadmanager.WLMWriter, dbcenterClient databasecenter.Client) ServiceSet

DefaultServiceFactory is the default service factory for the agent.

Directories

Path Synopsis
Package configuration provides configuration reading capabilities.
Package configuration provides configuration reading capabilities.
Package mongodb implements the MongoDB workload agent service.
Package mongodb implements the MongoDB workload agent service.
Package mysql implements the MySQL workload agent service.
Package mysql implements the MySQL workload agent service.
Package openshift implements the OpenShift workload agent service.
Package openshift implements the OpenShift workload agent service.
Package oracle implements the Oracle workload agent service.
Package oracle implements the Oracle workload agent service.
Package postgres implements the Postgres workload agent service.
Package postgres implements the Postgres workload agent service.
Package redis implements the Redis workload agent service.
Package redis implements the Redis workload agent service.
Package sqlserver implements the SQL Server workload agent service.
Package sqlserver implements the SQL Server workload agent service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL