options

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultLeaderElectionName = "dispatcher"

Variables

This section is empty.

Functions

func BindFlags

BindFlags binds the LeaderElectionConfiguration struct fields to a flagset

Types

type CombinedInsecureServingOptions

type CombinedInsecureServingOptions struct {
	Healthz *apiserveroptions.DeprecatedInsecureServingOptionsWithLoopback
	Metrics *apiserveroptions.DeprecatedInsecureServingOptionsWithLoopback

	BindPort    int    // overrides the structs above on ApplyTo, ignored on ApplyToFromLoadedConfig
	BindAddress string // overrides the structs above on ApplyTo, ignored on ApplyToFromLoadedConfig
}

CombinedInsecureServingOptions sets up to two insecure listeners for healthz and metrics. The flags override the DispatcherConfig and DeprecatedInsecureServingOptions values for both.

func (*CombinedInsecureServingOptions) AddFlags

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

AddFlags adds flags for the insecure serving options.

func (*CombinedInsecureServingOptions) ApplyTo

ApplyTo applies the insecure serving options to the given scheduler app configuration, and updates the componentConfig.

func (*CombinedInsecureServingOptions) ApplyToFromLoadedConfig

ApplyToFromLoadedConfig updates the insecure serving options from the component config and then applies it to the given scheduler app configuration.

func (*CombinedInsecureServingOptions) Validate

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

Validate validates the insecure serving options.

type Options

type Options struct {
	DispatcherConfig dispatcherconfig.GodelDispatcherConfiguration

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

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

	Master string

	CombinedInsecureServing *CombinedInsecureServingOptions
}

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns default dispatcher app options.

func (*Options) ApplyTo

func (o *Options) ApplyTo(c *dispatcherappconfig.Config) error

ApplyTo applies the dispatcher options to the given dispatcher app configuration.

func (*Options) Config

func (o *Options) Config() (*dispatcherappconfig.Config, error)

Config return a scheduler config object

func (*Options) Flags

func (o *Options) Flags() (nfs cliflag.NamedFlagSets)

Flags returns flags for a specific scheduler by section name

func (*Options) Validate

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

Validate validates all the required options.

Jump to

Keyboard shortcuts

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