config

package
v0.0.0-...-85d6a38 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel        string `yaml:"log_level" env:"LOG_LEVEL"`
	HealthcheckPort string `yaml:"healthcheck_port"`
	EnableMetrics   bool   `yaml:"enable_metrics" env:"ENABLE_METRICS"`
	Listen          struct {
		Host            string `yaml:"host" env:"HOST"`
		Port            string `yaml:"port" env:"PORT"`
		Mode            string `yaml:"server_mode" env:"SERVER_MODE"` // support GRPC, REST, BOTH
		MaxRequestSize  int    `yaml:"max_request_size" env:"MAX_REQUEST_SIZE"`
		MaxResponseSize int    `yaml:"max_response_size" env:"MAX_RESPONSE_SIZE"`
	} `yaml:"listen"`

	PrometheusConfig struct {
		Name         string                      `yaml:"service_name" env:"PROMETHEUS_SERVICE_NAME"`
		ServerConfig metrics.MetricsServerConfig `yaml:"server_config"`
	} `yaml:"prometheus"`

	JaegerConfig jaeger.Config `yaml:"jaeger"`
}

func GetConfig

func GetConfig() *Config

Jump to

Keyboard shortcuts

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