option

package
v5.2.0-beta2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 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
	EtcdCaFile   string
	EtcdCertFile string
	EtcdKeyFile  string
	ListenPorts  ListenPorts
	//This number should be, at maximum, the number of CPU cores on your system.
	WorkerProcesses    int
	WorkerRlimitNofile int
	ErrorLog           string
	ErrorLogLevel      string
	WorkerConnections  int
	//essential for linux, optmized to serve many clients with each thread
	EnableEpool       bool
	EnableMultiAccept bool
	KeepaliveTimeout  int
	KeepaliveRequests int
	NginxUser         string
	ResyncPeriod      time.Duration
	// health check
	HealthPath         string
	HealthCheckTimeout time.Duration

	EnableMetrics bool

	NodeName        string
	HostIP          string
	IgnoreInterface []string
	ShareMemory     uint64
	SyncRateLimit   float32
}

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
	Stream 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