option

package
v0.0.0-...-a3a5c94 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//Config
	Config = new(Conf)
)

Functions

func Init

func Init() error

Init config

Types

type Conf

type Conf struct {
	APIAddr                         string //api server listen port
	GrpcAPIAddr                     string //grpc api server listen port
	PrometheusAPI                   string //Prometheus server listen port
	K8SConfPath                     string //absolute path to the kubeconfig file
	LogLevel                        string
	LogFile                         string
	HostID                          string
	HostIP                          string
	PodIP                           string
	RunMode                         string //ACP_NODE operating mode:master,node
	NodeRule                        string //Node attributes compute manage storage
	Service                         string //Service registration and discovery
	InitStatus                      string
	NodePath                        string   //Kato node model basic information storage path in etcd
	EventLogServer                  []string //event server address list
	ConfigStoragePath               string   //config storage path in etcd
	LockPath                        string
	TTL                             int64         // node heartbeat to master TTL
	PodCIDR                         string        //pod cidr, when master not set cidr,this parameter can take effect
	EtcdEndpoints                   []string      // etcd endpoints
	EtcdDialTimeout                 time.Duration // etcd dial timeout
	EtcdCaFile                      string        // etcd ca file
	EtcdCertFile                    string        // etcd cert file
	EtcdKeyFile                     string        // etcd key file
	StatsdConfig                    StatsdConfig
	UDPMonitorConfig                UDPMonitorConfig
	MinResyncPeriod                 time.Duration
	AutoUnschedulerUnHealthDuration time.Duration
	AutoScheduler                   bool
	ReqTimeout                      int

	// for node controller
	ServiceListFile string
	ServiceManager  string
	EnableInitStart bool
	AutoRegistNode  bool
	//enable collect docker container log
	EnableCollectLog bool
	DockerCli        *dockercli.Client
	EtcdCli          *client.Client

	LicPath   string
	LicSoPath string

	// EnableImageGC is the trigger of image garbage collection.
	EnableImageGC bool
	// imageMinimumGCAge is the minimum age for an unused image before it is
	// garbage collected.
	ImageMinimumGCAge time.Duration
	// imageGCHighThresholdPercent is the percent of disk usage after which
	// image garbage collection is always run. The percent is calculated as
	// this field value out of 100.
	ImageGCHighThresholdPercent int32
	// imageGCLowThresholdPercent is the percent of disk usage before which
	// image garbage collection is never run. Lowest disk usage to garbage
	// collect to. The percent is calculated as this field value out of 100.
	ImageGCLowThresholdPercent int32
	// ImageGCPeriod is the period for performing image garbage collection.
	ImageGCPeriod time.Duration

	// Namespace for Kato application.
	RbdNamespace        string
	ImageRepositoryHost string
	GatewayVIP          string
	HostsFile           string
}

Conf

func (*Conf) AddFlags

func (a *Conf) AddFlags(fs *pflag.FlagSet)

AddFlags

func (*Conf) ParseClient

func (a *Conf) ParseClient(ctx context.Context, etcdClientArgs *etcdutil.ClientArgs) (err error)

ParseClient handle config and create some api

func (*Conf) SetLog

func (a *Conf) SetLog()

SetLog

type StatsdConfig

type StatsdConfig struct {
	StatsdListenAddress string
	StatsdListenUDP     string
	StatsdListenTCP     string
	MappingConfig       string
	ReadBuffer          int
}

StatsdConfig

type UDPMonitorConfig

type UDPMonitorConfig struct {
	ListenHost string
	ListenPort string
}

UDPMonitorConfig

Jump to

Keyboard shortcuts

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