config

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBlobPlugin     = "badger"
	DefaultMetadataPlugin = "sqlite"
)
View Source
const DefaultShutdownTimeout = "30s"

Variables

View Source
var ErrPluginListRequested = errors.New("plugin list requested")

ErrPluginListRequested is returned when the user requests to list available plugins This is not an error condition but a successful operation that displays plugin information

Functions

func GetTopologyConfig

func GetTopologyConfig() *topology.TopologyConfig

func LoadTopologyConfig

func LoadTopologyConfig() (*topology.TopologyConfig, error)

func WithContext added in v0.5.0

func WithContext(ctx context.Context, cfg *Config) context.Context

Types

type Config

type Config struct {
	MetadataPlugin     string `yaml:"metadataPlugin"     envconfig:"DINGO_DATABASE_METADATA_PLUGIN"`
	TlsKeyFilePath     string `yaml:"tlsKeyFilePath"     envconfig:"TLS_KEY_FILE_PATH"`
	Topology           string `yaml:"topology"`
	CardanoConfig      string `yaml:"cardanoConfig"      envconfig:"config"`
	DatabasePath       string `yaml:"databasePath"                                                  split_words:"true"`
	SocketPath         string `yaml:"socketPath"                                                    split_words:"true"`
	TlsCertFilePath    string `yaml:"tlsCertFilePath"    envconfig:"TLS_CERT_FILE_PATH"`
	BindAddr           string `yaml:"bindAddr"                                                      split_words:"true"`
	BlobPlugin         string `yaml:"blobPlugin"         envconfig:"DINGO_DATABASE_BLOB_PLUGIN"`
	PrivateBindAddr    string `yaml:"privateBindAddr"                                               split_words:"true"`
	ShutdownTimeout    string `yaml:"shutdownTimeout"                                               split_words:"true"`
	Network            string `yaml:"network"`
	MempoolCapacity    int64  `yaml:"mempoolCapacity"                                               split_words:"true"`
	PrivatePort        uint   `yaml:"privatePort"                                                   split_words:"true"`
	RelayPort          uint   `yaml:"relayPort"          envconfig:"port"`
	UtxorpcPort        uint   `yaml:"utxorpcPort"                                                   split_words:"true"`
	MetricsPort        uint   `yaml:"metricsPort"                                                   split_words:"true"`
	IntersectTip       bool   `yaml:"intersectTip"                                                  split_words:"true"`
	ValidateHistorical bool   `yaml:"validateHistorical"                                            split_words:"true"`
	DevMode            bool   `yaml:"devMode"                                                       split_words:"true"`
}

func FromContext added in v0.5.0

func FromContext(ctx context.Context) *Config

func GetConfig

func GetConfig() *Config

func LoadConfig

func LoadConfig(configFile string) (*Config, error)

func (*Config) ParseCmdlineArgs added in v0.18.0

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

Jump to

Keyboard shortcuts

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