onetime

package
v0.0.0-...-8f1fef5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package onetime contains the common methods which will be used by multiple OTE features to avoid duplication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureUsageMetricsForOTE

func ConfigureUsageMetricsForOTE(cp *cpb.CloudProperties, name, version string)

ConfigureUsageMetricsForOTE configures usage metrics for the Workload Agent in one time execution mode.

func NewWinServiceCommand

func NewWinServiceCommand(ctx context.Context, daemon *cobra.Command) *cobra.Command

NewWinServiceCommand returns a new winservice command.

func Register

func Register(osType string, cmd *cobra.Command)

Register registers the persistent flags for the command.

func SetValues

func SetValues(agentName string, lp *log.Parameters, cmd *cobra.Command, logName string)

SetValues sets the persistent flags for the subcommand.

Types

type InternallyInvokedOTE

type InternallyInvokedOTE struct {
	InvokedBy string
	Lp        log.Parameters
	Cp        *cpb.CloudProperties
}

InternallyInvokedOTE is a struct which contains necessary context for an OTE when it is not invoked via command line.

type Options

type Options struct {
	Help, Version  bool
	Name, LogLevel string
	Fs             *pflag.FlagSet
	IIOTE          *InternallyInvokedOTE
}

Options is a struct which contains necessary context for Init function to initialise the OTEs.

type Winservice

type Winservice struct {
	Service winsvc.Service
	Daemon  *cobra.Command
	// contains filtered or unexported fields
}

Winservice has args for winservice subcommands.

func (*Winservice) Execute

func (w *Winservice) Execute(cmd *cobra.Command, args []string) error

Execute implements the subcommand interface for winservice.

func (*Winservice) Start

func (w *Winservice) Start(s winsvc.Service) error

Start implements the subcommand interface for winservice.

func (*Winservice) Stop

func (w *Winservice) Stop(s winsvc.Service) error

Stop implements the subcommand interface for winservice.

Directories

Path Synopsis
Package configure implements the configure subcommand.
Package configure implements the configure subcommand.
cliconfig
Package cliconfig defines the types used for the Google Cloud Agent for Compute Workloads CLI configuration.
Package cliconfig defines the types used for the Google Cloud Agent for Compute Workloads CLI configuration.
mysql
Package mysql implements the mysql subcommand.
Package mysql implements the mysql subcommand.
oracle
Package oracle implements the oracle subcommand.
Package oracle implements the oracle subcommand.
redis
Package redis implements the redis subcommand.
Package redis implements the redis subcommand.
sqlserver
Package sqlserver implements the sqlserver subcommand.
Package sqlserver implements the sqlserver subcommand.
Package logusage implements the one time execution mode for usage logging.
Package logusage implements the one time execution mode for usage logging.
Package migrate implements the migrate subcommand.
Package migrate implements the migrate subcommand.
Package status provides information on the agent, configuration, IAM and functional statuses.
Package status provides information on the agent, configuration, IAM and functional statuses.
Package version implements the version subcommand.
Package version implements the version subcommand.

Jump to

Keyboard shortcuts

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