config

package
v0.17.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultInputPlugin  = "chainsync"
	DefaultOutputPlugin = "log"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiConfig added in v0.16.0

type ApiConfig struct {
	ListenAddress string `yaml:"address" envconfig:"API_ADDRESS"`
	ListenPort    uint   `yaml:"port" envconfig:"API_PORT"`
}

type Config

type Config struct {
	Api        ApiConfig                                         `yaml:"api"`
	ConfigFile string                                            `yaml:"-"`
	Version    bool                                              `yaml:"-"`
	Logging    LoggingConfig                                     `yaml:"logging"`
	Debug      DebugConfig                                       `yaml:"debug"`
	Input      string                                            `yaml:"input"   envconfig:"INPUT"`
	Output     string                                            `yaml:"output"  envconfig:"OUTPUT"`
	Plugin     map[string]map[string]map[interface{}]interface{} `yaml:"plugins"`
}

func GetConfig

func GetConfig() *Config

GetConfig returns the global config instance

func (*Config) Load

func (c *Config) Load(configFile string) error

func (*Config) ParseCmdlineArgs

func (c *Config) ParseCmdlineArgs(programName string, args []string) error

type DebugConfig

type DebugConfig struct {
	ListenAddress string `yaml:"address" envconfig:"DEBUG_ADDRESS"`
	ListenPort    uint   `yaml:"port"    envconfig:"DEBUG_PORT"`
}

type LoggingConfig

type LoggingConfig struct {
	Level string `yaml:"level" envconfig:"LOGGING_LEVEL"`
}

Jump to

Keyboard shortcuts

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