config

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func SaveAtomic added in v0.40.0

func SaveAtomic(path string, data interface{}) error

SaveAtomic writes the data to disk using a temporary file and atomic rename.

Types

type ApiConfig

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

type ApiEventsConfig added in v0.38.0

type ApiEventsConfig struct {
	BufferSize uint `yaml:"buffer-size" envconfig:"API_EVENTS_BUFFER_SIZE"`
}

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) BindFlags added in v0.35.0

func (c *Config) BindFlags(fs *pflag.FlagSet) error

func (*Config) Load

func (c *Config) Load(configFile 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