options

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultStoreFile contains path of the default store file
	DefaultStoreFile   = "/var/lib/cni/nv-ipam/store"
	DefaultBindAddress = cniTypes.DefaultDaemonSocket
)

Variables

This section is empty.

Functions

func ParseBindAddress

func ParseBindAddress(addr string) (string, string, error)

ParseBindAddress parses bind-address and return network and address part separately, returns error if bind-address format is invalid

Types

type Options

type Options struct {
	cmdoptions.Options
	MetricsAddr    string
	ProbeAddr      string
	NodeName       string
	PoolsNamespace string
	BindAddress    string
	StoreFile      string
	// shim CNI parameters
	CNIBinDir                   string
	CNIBinFile                  string
	CNISkipBinFileCopy          bool
	CNISkipConfigCreation       bool
	CNIConfDir                  string
	CNIDaemonSocket             string
	CNIDaemonCallTimeoutSeconds int
	CNILogFile                  string
	CNILogLevel                 string
}

Options holds command line options for controller

func New

func New() *Options

New initialize and return new Options object

func (*Options) AddNamedFlagSets

func (o *Options) AddNamedFlagSets(sharedFS *cliflag.NamedFlagSets)

AddNamedFlagSets register flags for common options in NamedFlagSets

func (*Options) Validate

func (o *Options) Validate() error

Validate registered options

Jump to

Keyboard shortcuts

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