options

package
v0.2.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package options provides the flags used for the controller manager.

Index

Constants

View Source
const (
	// ControllerManagerUserAgent is the userAgent name when starting onex-controller managers.
	ControllerManagerUserAgent = "onex-controller-manager"
)

Variables

This section is empty.

Functions

func LogOrWriteConfig

func LogOrWriteConfig(fileName string, cfg *config.OneXControllerManagerConfiguration) error

LogOrWriteConfig logs the completed component config and writes it into the given file name as YAML, if either is enabled.

Types

type ChainControllerOptions

type ChainControllerOptions struct {
	*chainconfig.ChainControllerConfiguration
}

ChainControllerOptions holds the ChainController options.

func (*ChainControllerOptions) AddFlags

func (o *ChainControllerOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags related to ChainController for controller manager to the specified FlagSet.

func (*ChainControllerOptions) ApplyTo

ApplyTo fills up ChainControllerOptions config with options.

func (*ChainControllerOptions) Validate

func (o *ChainControllerOptions) Validate() []error

Validate checks validation of GarbageCollectorController.

type Options

type Options struct {
	Generic                    *genericconfigoptions.GenericControllerManagerConfigurationOptions
	GarbageCollectorController *genericconfigoptions.GarbageCollectorControllerOptions
	MySQL                      *genericconfigoptions.MySQLOptions
	ChainController            *ChainControllerOptions

	// ConfigFile is the location of the miner controller server's configuration file.
	ConfigFile string

	// WriteConfigTo is the path where the default configuration will be written.
	WriteConfigTo string

	// The address of the Kubernetes API server (overrides any value in kubeconfig).
	Master string
	// Path to kubeconfig file with authorization and master location information.
	Kubeconfig string
	Metrics    *metrics.Options
	Logs       *logs.Options
}

Options is the main context object for the onex-controller manager.

func NewOptions

func NewOptions() (*Options, error)

NewOptions creates a new Options with a default config.

func (*Options) ApplyTo

func (o *Options) ApplyTo(c *controllermanagerconfig.Config, allControllers []string, disabledControllers []string, controllerAliases map[string]string) error

ApplyTo fills up onex controller manager config with options.

func (*Options) Complete

func (o *Options) Complete() error

func (Options) Config

func (o Options) Config(allControllers []string, disabledControllers []string, controllerAliases map[string]string) (*controllermanagerconfig.Config, error)

Config return a controller manager config objective.

func (*Options) Flags

func (o *Options) Flags(allControllers []string, disabledControllers []string, controllerAliases map[string]string) cliflag.NamedFlagSets

Flags returns flags for a specific APIServer by section name.

func (*Options) Validate

func (o *Options) Validate(allControllers []string, disabledControllers []string, controllerAliases map[string]string) error

Validate is used to validate the options and config before launching the controller.

Jump to

Keyboard shortcuts

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