rainbond: github.com/goodrain/rainbond/cmd/node/option Index | Files

package option

import "github.com/goodrain/rainbond/cmd/node/option"


Package Files



var (

    //Config config
    Config = new(Conf)

func Init Uses

func Init() error

Init 初始化

type Conf Uses

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
    HostIDFile                      string
    HostIP                          string
    RunMode                         string //ACP_NODE 运行模式:master,node
    NodeRule                        string //节点属性 compute manage storage
    Service                         string //服务注册与发现
    InitStatus                      string
    NodePath                        string   //Rainbond 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
    Etcd                            client.Config
    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

Conf Conf

func (*Conf) AddFlags Uses

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

AddFlags AddFlags

func (*Conf) ParseClient Uses

func (a *Conf) ParseClient() (err error)

ParseClient handle config and create some api

func (*Conf) SetLog Uses

func (a *Conf) SetLog()

SetLog 设置log

type StatsdConfig Uses

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

StatsdConfig StatsdConfig

type UDPMonitorConfig Uses

type UDPMonitorConfig struct {
    ListenHost string
    ListenPort string

UDPMonitorConfig UDPMonitorConfig

Package option imports 12 packages (graph) and is imported by 17 packages. Updated 2019-08-23. Refresh now. Tools for package owners.