options

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServerRunFlags

func AddServerRunFlags(fs *pflag.FlagSet)

AddServerRunFlags add ServerRunOptions flags to pflag.FlagSet

func WrapConfig

func WrapConfig(config *server.RecommendedConfig) *server.RecommendedConfig

WrapConfig wraps server.RecommendedConfig with default ServerRunOptions

Types

type ServerRunOptions

type ServerRunOptions struct {
	RequestTimeout    time.Duration
	MinRequestTimeout int
}

ServerRunOptions is the extension option for configuring the APIServer

func NewServerRunOptions

func NewServerRunOptions() *ServerRunOptions

NewServerRunOptions create default ServerRunOptions with RequestTimeout and MinRequestTimeout set

func (*ServerRunOptions) AddFlags

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

AddFlags add flags for a specific APIServer to the specified FlagSet

func (*ServerRunOptions) ApplyTo

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

ApplyTo set the params in server.RecommendConfig

Jump to

Keyboard shortcuts

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