config

package
v0.0.0-...-228c16a Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FilePath string

The config file path used by Load config

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel            int8                   `json:"log_level"      yaml:"log_level"      env:"LOG_LEVEL,default=1" validate:"gte=1,lte=5"`
	GRPCServer          *grpcwrap.ServerConfig `json:"grpc_server"    yaml:"grpc_server"    env:"GRPC_SERVER"         validate:"required"`
	MetricsServer       *metrics.Config        `json:"metrics_server" yaml:"metrics_server" env:"METRICS_SERVER"      validate:"required"`
	MySQL               *gormwrap.MySQLConfig  `json:"mysql"          yaml:"mysql"          env:"MYSQL"               validate:"required"`
	Tracer              *gtrace.Config         `json:"tracer"         yaml:"tracer"         env:"TRACER"              validate:"required"`
	EnginemanagerServer *grpcwrap.ClientConfig `json:"enginemanager_server" yaml:"enginemanager_server" env:"ENGINEMANAGER_SERVER" validate:"required"`
}

Config is the configuration settings for spacemanager

func Load

func Load() (cfg *Config, err error)

LoadConfig load all configuration from specified file Must be set `FilePath` before called

Jump to

Keyboard shortcuts

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