config

package
v0.2401.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package config implements global configuration options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Node's data directory.
	DataDir string `yaml:"data_dir"`
	// Path to the node's internal unix socket.
	InternalSocketPath string `yaml:"internal_socket_path,omitempty"`
	// Logging configuration options.
	Log LogConfig `yaml:"log,omitempty"`
	// Debug configuration options (do not use).
	Debug DebugConfig `yaml:"debug,omitempty"`
}

Config is the common configuration structure.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration settings.

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration settings.

type DebugConfig

type DebugConfig struct {
	// Allow running the node as root.
	AllowRoot bool `yaml:"allow_root,omitempty"`
	// Set RLIMIT_NOFILE to this value on launch (0 means don't set).
	Rlimit uint64 `yaml:"rlimit,omitempty"`
}

DebugConfig is the common debug configuration structure.

type LogConfig

type LogConfig struct {
	// Log file.
	File string `yaml:"file,omitempty"`
	// Log format (logfmt, json).
	Format string `yaml:"format,omitempty"`
	// Log level (debug, info, warn, error) per module.
	Level map[string]string `yaml:"level,omitempty"`
}

LogConfig is the common logging configuration structure.

Jump to

Keyboard shortcuts

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