config

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 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

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

type ByronGenesisConfig added in v0.34.0

type ByronGenesisConfig struct {
	EndSlot            *uint64 `yaml:"end_slot"              envconfig:"BYRON_GENESIS_END_SLOT"`
	EpochLength        uint64  `yaml:"epoch_length"          envconfig:"BYRON_GENESIS_EPOCH_LENGTH"`
	ByronSlotsPerEpoch uint64  `yaml:"byron_slots_per_epoch" envconfig:"BYRON_GENESIS_BYRON_SLOTS_PER_EPOCH"`
}

ByronGenesisConfig holds Byron era genesis parameters

type Config

type Config struct {
	ByronGenesis      ByronGenesisConfig                `yaml:"byron_genesis"      envconfig:"BYRON_GENESIS"`
	Plugin            map[string]map[string]map[any]any `yaml:"plugins"            envconfig:"PLUGINS"`
	Logging           LoggingConfig                     `yaml:"logging"            envconfig:"LOGGING"`
	ConfigFile        string                            `yaml:"-"`
	Input             string                            `yaml:"input"              envconfig:"INPUT"`
	Output            string                            `yaml:"output"             envconfig:"OUTPUT"`
	KupoUrl           string                            `yaml:"kupo_url"           envconfig:"KUPO_URL"`
	Api               ApiConfig                         `yaml:"api"                envconfig:"API"`
	Debug             DebugConfig                       `yaml:"debug"              envconfig:"DEBUG"`
	ShelleyGenesis    ShelleyGenesisConfig              `yaml:"shelley_genesis"    envconfig:"SHELLEY_GENESIS"`
	ShelleyTransEpoch int32                             `yaml:"shelley_trans_epoch" envconfig:"SHELLEY_TRANS_EPOCH"`
	Version           bool                              `yaml:"-"`
}

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"`
}

type ShelleyGenesisConfig added in v0.34.0

type ShelleyGenesisConfig struct {
	EpochLength uint64 `yaml:"epoch_length" envconfig:"SHELLEY_GENESIS_EPOCH_LENGTH"`
}

ShelleyGenesisConfig holds Shelley era genesis parameters

Jump to

Keyboard shortcuts

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