config

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterMutex sync.RWMutex
View Source
var ClusterNodes []ClusterNode = nil

Functions

func GetWorkDirectory

func GetWorkDirectory() string

func MarshConfigFile

func MarshConfigFile() error

func ParseConfigFile

func ParseConfigFile(path, version string) error

Types

type CKManConfig

type CKManConfig struct {
	ConfigFile string `yaml:"-"`
	Server     CKManServerConfig
	Log        CKManLogConfig
	Prometheus CKManPrometheusConfig
	Nacos      CKManNacosConfig
	Version    string `yaml:"-"`
}
var GlobalConfig CKManConfig

type CKManLogConfig

type CKManLogConfig struct {
	Level    string
	MaxCount int `yaml:"max_count"`
	MaxSize  int `yaml:"max_size"`
	MaxAge   int `yaml:"max_age"`
}

type CKManNacosConfig

type CKManNacosConfig struct {
	Enabled   bool
	Hosts     []string
	Port      uint64
	UserName  string `yaml:"user_name"`
	Password  string
	Namespace string
	Group     string
	DataID    string `yaml:"data_id"`
}

type CKManPprofConfig

type CKManPprofConfig struct {
	Enabled bool
	Ip      string
	Port    int
}

type CKManPrometheusConfig

type CKManPrometheusConfig struct {
	Hosts   []string
	Timeout int
}

type CKManServerConfig

type CKManServerConfig struct {
	Id             int
	Bind           string
	Ip             string
	Port           int
	Https          bool
	Pprof          bool
	SessionTimeout int    `yaml:"session_timeout"`
	SwaggerEnable  bool   `yaml:"swagger_enable"`
	PublicKey      string `yaml:"public_key"`
}

type ClusterNode

type ClusterNode struct {
	Ip   string `json:"ip"`
	Port int    `json:"port"`
}

func GetClusterPeers

func GetClusterPeers() []ClusterNode

Jump to

Keyboard shortcuts

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