conf

package
v0.0.0-...-e67e6ae Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = true
)

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig struct {
	ProfPathPrefix string
	LogLevel       string
	ProfEnable     bool
	TracerEnable   bool
	WhiteList      []string
	Endpoints      []string
}

type Config

type Config struct {
	Discovery  *registry.Config
	RPCClient  *RPCClientConfig
	RPCServer  *RPCServerConfig
	Slot       *SlotConfig
	Base       *BaseConfig
	Metrics    *MetricsConfig
	Prometheus *Prometheus
}

Config config.

func Default

func Default() *Config

Default new a config with specified default value.

func LoadTomlFile

func LoadTomlFile(confPath string) *Config

LoadTomlFile load config file.

type CoreConfig

type CoreConfig struct {
	LogLevel log.Level
}

Core Config

type MetricsConfig

type MetricsConfig struct {
	Endpoint       string
	ReportInterval int
}

type Prometheus

type Prometheus struct {
	Zone      string
	Node      string
	Name      string
	Host      string
	Module    string
	ExitFlag  bool
	Endpoints []string
}

func (*Prometheus) Address

func (this *Prometheus) Address() string

type RPCClientConfig

type RPCClientConfig struct {
	Dial                  xtime.Duration
	Timeout               xtime.Duration
	PermitWithoutStream   bool
	InitialWindowSize     int32
	InitialConnWindowSize int32
	BackoffMaxDelay       xtime.Duration
}

RPCClientConfig is RPC client config.

type RPCServerConfig

type RPCServerConfig struct {
	APPID                string
	Addr                 string
	Timeout              xtime.Duration
	IdleTimeout          xtime.Duration
	MaxLifeTime          xtime.Duration
	ForceCloseWait       xtime.Duration
	KeepAliveInterval    xtime.Duration
	KeepAliveTimeout     xtime.Duration
	MaxMessageSize       int32
	MaxConcurrentStreams int32
	EnableOpenTracing    bool
}

RPCServer is RPC server config.

type SlotConfig

type SlotConfig struct {
	SlotNum    int
	WorkerSize int
}

Jump to

Keyboard shortcuts

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