option

package
v5.1.5-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	K8SConfPath  string
	EtcdEndpoint []string
	EtcdTimeout  int
	ListenPorts  ListenPorts
	//This number should be, at maximum, the number of CPU cores on your system.
	WorkerProcesses    int
	WorkerRlimitNofile int
	ErrorLog           string
	WorkerConnections  int
	//essential for linux, optmized to serve many clients with each thread
	EnableEpool       bool
	EnableMultiAccept bool
	KeepaliveTimeout  int
	KeepaliveRequests int
	NginxUser         string
	IP                string
	ResyncPeriod      time.Duration
	// health check
	HealthPath         string
	HealthCheckTimeout time.Duration

	EnableMetrics bool

	EnableRbdEndpoints bool
	RbdEndpointsKey    string // key of Rainbond endpoints in ETCD
	EnableKApiServer   bool
	KApiServerIP       string
	EnableLangGrMe     bool
	LangGrMeIP         string
	EnableMVNGrMe      bool
	MVNGrMeIP          string
	EnableGrMe         bool
	GrMeIP             string
	EnableRepoGrMe     bool
	RepoGrMeIP         string
	NodeName           string
	HostIP             string
	EnableInterface    []string
}

Config contains all configuration

type GWServer

type GWServer struct {
	Config
	LogLevel string
	Debug    bool
}

GWServer contains Config and LogLevel

func NewGWServer

func NewGWServer() *GWServer

NewGWServer creates a new option.GWServer

func (*GWServer) AddFlags

func (g *GWServer) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags

func (*GWServer) CheckConfig

func (g *GWServer) CheckConfig() error

CheckConfig check config

func (*GWServer) SetLog

func (g *GWServer) SetLog()

SetLog sets log

type ListenPorts

type ListenPorts struct {
	HTTP   int
	HTTPS  int
	Status int
	Health int
}

ListenPorts describe the ports required to run the gateway controller

Jump to

Keyboard shortcuts

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