options

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP                          = "http"
	HTTPS                         = "https"
	ServerTypeSecure   ServerType = 1
	ServerTypeInsecure ServerType = 2

	TLSTypeClient = 1
	TLSTypeServer = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeDriverServerOptions

type KubeDriverServerOptions struct {
	BindAddress      net.IP
	HostIP           string
	ZkServers        string
	SecurePort       uint
	InsecurePort     uint
	ExternalIp       string
	ExternalPort     uint
	KubeMasterUrl    string
	KubeClientTLS    TLSConfig
	ClusterClientTLS TLSConfig
	ClusterKeeperUrl string
	ServerTLS        TLSConfig
	RootWebContainer *restful.Container
	Environment      string

	// 181114 added by wesleylin, support custom report ip:port and clusterID
	CustomReportAddress string
	CustomReportPort    uint
	CustomClusterID     string

	RegisterWithWebsocket bool
	RegisterToken         string
	RegisterUrl           string
	InsecureSkipVerify    bool
}

func NewKubeDriverServerOptions

func NewKubeDriverServerOptions() *KubeDriverServerOptions

func (*KubeDriverServerOptions) BindFlagSet

func (o *KubeDriverServerOptions) BindFlagSet(fs *pflag.FlagSet)

BindFlagSet binds a ServerOptions with a FlagSet, when it get parsed, ServerOptions's values will be set by input flags.

func (*KubeDriverServerOptions) GetClusterKeeperAddr

func (o *KubeDriverServerOptions) GetClusterKeeperAddr() error

func (*KubeDriverServerOptions) InsecureServerConfigured

func (o *KubeDriverServerOptions) InsecureServerConfigured() bool

func (*KubeDriverServerOptions) MakeServerAddress

func (o *KubeDriverServerOptions) MakeServerAddress(serverType ServerType) string

MakeServerAddress returns server address like "127.0.0.1:8080" for http module to listen on

func (*KubeDriverServerOptions) NeedClientTLSConfig

func (o *KubeDriverServerOptions) NeedClientTLSConfig() bool

func (*KubeDriverServerOptions) NeedClusterTLSConfig

func (o *KubeDriverServerOptions) NeedClusterTLSConfig() bool

func (*KubeDriverServerOptions) SecureServerConfigured

func (o *KubeDriverServerOptions) SecureServerConfigured() bool

func (*KubeDriverServerOptions) Validate

func (o *KubeDriverServerOptions) Validate() error

Validate checks given parameters is valid or not

type ServerType

type ServerType int

type TLSConfig

type TLSConfig struct {
	TLSType int

	CertFile string
	KeyFile  string
	CAFile   string
	// paasword of private key
	Password string
}

func (TLSConfig) ToConfigObj

func (c TLSConfig) ToConfigObj() (config *tls.Config, err error)

ToServerConfigObj read current TLS Config files and return a Config object

Jump to

Keyboard shortcuts

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