options

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfigFlag

func AddConfigFlag(basename string, fs *pflag.FlagSet)

addConfigFlag adds flags for a specific server to the specified FlagSet object.

func HomeDir

func HomeDir() string

HomeDir returns the home directory for the current user. On Windows: 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.apimachinery\config` file is returned. 2. if none of those locations contain a `.apimachinery\config` file, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned. 3. if none of those locations are writeable, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned. 4. if none of those locations exists, the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned.

func PrintConfig

func PrintConfig()

func PrintFlags

func PrintFlags(flags *pflag.FlagSet)

PrintFlags logs the flags in the flagset.

func PrintWorkingDir

func PrintWorkingDir()

Types

type ClientOptions

type ClientOptions struct {
	ListenOn             string `json:"listen-on"           mapstructure:"listen-on"`
	ServerEndpointSocket string `json:"server-endpoint"     mapstructure:"server-endpoint"`
	TokenPlugin          string `json:"token-source-plugin" mapstructure:"token-source-plugin"`
	TokenSource          string `json:"token-source"        mapstructure:"token-source"`
}

ClientOptions contains information for a client service.

func GetDefaultClientOptions

func GetDefaultClientOptions() *ClientOptions

GetDefaultClientOptions returns a client configuration with default values.

func (*ClientOptions) AddFlags

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

AddFlags adds flags for a specific Server to the specified FlagSet.

type RestfulAPIOptions

type RestfulAPIOptions struct {
	HttpdListenOn string `json:"httpd-listen-on" mapstructure:"httpd-listen-on"`
}

RestfulAPIOptions contains the options while running a API server.

func GetDefaultRestfulAPIOptions

func GetDefaultRestfulAPIOptions() *RestfulAPIOptions

func (*RestfulAPIOptions) AddFlags

func (r *RestfulAPIOptions) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags for a specific Server to the specified FlagSet.

type SecureOptions

type SecureOptions struct {
	KeyFile              string `json:"key-file"               mapstructure:"key-file"`
	CertFile             string `json:"cert-file"              mapstructure:"cert-file"`
	CaFile               string `json:"ca-file"                mapstructure:"ca-file"`
	VerifyRemoteEndpoint bool   `json:"verify-remote-endpoint" mapstructure:"verify-remote-endpoint"`
}

SecureOptions contains information for TLS.

func GetDefaultSecureOptions

func GetDefaultSecureOptions() *SecureOptions

GetDefaultSecureOptions returns a Secure configuration with default values.

func (*SecureOptions) AddFlags

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

AddFlags adds flags for a specific Server to the specified FlagSet.

type ServerOptions

type ServerOptions struct {
	ListenOn          string `json:"listen-on"           mapstructure:"listen-on"`
	TokenParserPlugin string `json:"token-parser-plugin" mapstructure:"token-parser-plugin"`
	TokenParserKey    string `json:"token-parser-key"    mapstructure:"token-parser-key"`
}

ServerOptions contains information for a client service.

func GetDefaultServerOptions

func GetDefaultServerOptions() *ServerOptions

GetDefaultServerOptions returns a server configuration with default values.

func (*ServerOptions) AddFlags

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

AddFlags adds flags for a specific Server to the specified FlagSet.

Jump to

Keyboard shortcuts

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