options

package
v0.0.0-...-d691e2b Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateListener

func CreateListener(network, addr string) (net.Listener, int, error)

Types

type FeatureOptions

type FeatureOptions struct {
	EnableProfiling           bool
	EnableContentionProfiling bool
	EnableMetrics             bool
	SummaryOverheadMs         int
}

func NewFeatureOptions

func NewFeatureOptions() *FeatureOptions

func (*FeatureOptions) AddFlags

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

func (*FeatureOptions) ApplyTo

func (o *FeatureOptions) ApplyTo(c *server.Config) error

func (*FeatureOptions) Validate

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

type RecommendedOptions

type RecommendedOptions struct {
	ServerRunOptions *ServerRunOptions
	SecureServing    *SecureServingOptions
	Features         *FeatureOptions
}

RecommendedOptions contains the recommended options for running an API server. If you add something to this list, it should be in a logical grouping. Each of them can be nil to leave the feature unconfigured on ApplyTo.

func NewRecommendedOptions

func NewRecommendedOptions() *RecommendedOptions

func (*RecommendedOptions) AddFlags

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

func (*RecommendedOptions) ApplyTo

func (o *RecommendedOptions) ApplyTo(config *server.RecommendedConfig) error

ApplyTo adds RecommendedOptions to the server configuration. scheme is the scheme of the apiserver types that are sent to the admission chain. pluginInitializers can be empty, it is only need for additional initializers.

func (*RecommendedOptions) Validate

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

type SecureServingOptions

type SecureServingOptions struct {
	BindAddress net.IP
	// BindPort is ignored when Listener is set, will serve https even with 0.
	BindPort int
	// BindNetwork is the type of network to bind to - defaults to "tcp", accepts "tcp",
	// "tcp4", and "tcp6".
	BindNetwork string

	// Listener is the secure server network listener.
	// either Listener or BindAddress/BindPort/BindNetwork is set,
	// if Listener is set, use it and omit BindAddress/BindPort/BindNetwork.
	Listener net.Listener
}

func NewSecureServingOptions

func NewSecureServingOptions() *SecureServingOptions

func (*SecureServingOptions) AddFlags

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

func (*SecureServingOptions) ApplyTo

func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error

ApplyTo fills up serving information in the server configuration.

func (*SecureServingOptions) Validate

func (s *SecureServingOptions) Validate() []error

type ServerRunOptions

type ServerRunOptions struct {
	MaxRequestsInFlight int
	Version             bool
}

ServerRunOptions contains the options while running a generic api server.

func NewServerRunOptions

func NewServerRunOptions() *ServerRunOptions

NewServerRunOptions create a default options for a generic api server.

func (*ServerRunOptions) AddUniversalFlags

func (s *ServerRunOptions) AddUniversalFlags(fs *pflag.FlagSet)

AddUniversalFlags parse the flags

func (*ServerRunOptions) ApplyTo

func (s *ServerRunOptions) ApplyTo(c *server.Config) error

ApplyTo applies the run options to the method receiver and returns self

Jump to

Keyboard shortcuts

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