options

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2019 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperatorOpts

type OperatorOpts struct {
	// KubeConfig is the path to a kubeconfig file, specifying how to connect to
	// the API server.
	KubeConfig string `yaml:"kubeconfig"`

	// Master is the address of the Kubernetes API server (overrides any value
	// in kubeconfig).
	Master string `yaml:"master"`

	// Namespace is the (optional) namespace in which the Rocketmq operator will
	// manage Rocketmq Clusters. Defaults to metav1.NamespaceAll.
	Namespace string `yaml:"namespace"`

	// Hostname of the pod the operator is running in.
	Hostname string `yaml:"hostname"`

	// minResyncPeriod is the resync period in reflectors; will be random
	// between minResyncPeriod and 2*minResyncPeriod.
	MinResyncPeriod metav1.Duration `yaml:"minResyncPeriod"`
}

OperatorOpts holds the options for the Operator.

func NewOperatorOpts

func NewOperatorOpts(filePath string) (*OperatorOpts, error)

NewOperatorOpts will create a new OperatorOpts. If a valid config file is specified and exists, it will be used to initialise the OperatorOpts. Otherwise, a default OperatorOpts will be created.

The values specified by either default may later be customised and overidden by user specified commandline parameters.

func (*OperatorOpts) AddFlags

func (s *OperatorOpts) AddFlags(fs *pflag.FlagSet) *pflag.FlagSet

AddFlags adds the operator flags to a given FlagSet.

func (*OperatorOpts) EnsureDefaults

func (s *OperatorOpts) EnsureDefaults()

EnsureDefaults provides a default configuration when required values have not been set.

Jump to

Keyboard shortcuts

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