appcontext

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigType

type ConfigType struct {
	ConfigFile    string `json:"-" cli:"config"`
	ConfigVersion string `json:"version" yaml:"version" toml:"version"`
	ServiceName   string `json:"service_name" yaml:"service_name" toml:"service_name" env:"SERVICE_NAME" default:"eventstream"`

	LogAddr    string `json:"log_addr" yaml:"log_addr" toml:"log_addr" default:"" env:"LOG_ADDR"`
	LogLevel   string `json:"log_level" yaml:"log_level" toml:"log_level" default:"debug" env:"LOG_LEVEL"`
	LogEncoder string `json:"log_encoder" yaml:"log_encoder" toml:"server" env:"LOG_ENCODER"`

	Profile profilerConfig `json:"profile" yaml:"profile" toml:"profile"`

	Stores  map[string]configItem `json:"stores"  yaml:"stores"  toml:"stores"`
	Sources map[string]configItem `json:"sources" yaml:"sources" toml:"sources"`
	Streams map[string]configItem `json:"streams" yaml:"streams" toml:"streams"`

	Jaeger struct {
		AgentHost string `env:"JAEGER_AGENT_HOST"`
	}
	// contains filtered or unexported fields
}

ConfigType contains all application options

var Config ConfigType

Config instance

func (*ConfigType) ConfigFilepath

func (cfg *ConfigType) ConfigFilepath() string

ConfigFilepath name

func (*ConfigType) IsDebug

func (cfg *ConfigType) IsDebug() bool

IsDebug mode ON

func (*ConfigType) Load

func (cfg *ConfigType) Load() error

Load eventstore config

func (*ConfigType) String

func (cfg *ConfigType) String() string

func (*ConfigType) Validate

func (cfg *ConfigType) Validate() error

Validate config

Jump to

Keyboard shortcuts

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