config

package
v0.0.0-...-9307437 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Directory     string `yaml:"directory,omitempty"`
	AutoOpenWebUI bool   `yaml:"autoOpenWebUI,omitempty"`

	HTTP      HTTP      `yaml:"http,omitempty"`
	Consensus Consensus `yaml:"consensus,omitempty"`
	Syncer    Syncer    `yaml:"syncer,omitempty"`
	Scanner   Scanner   `yaml:"scanner,omitempty"`
	Log       Log       `yaml:"log,omitempty"`
	Index     Index     `yaml:"index,omitempty"`
}

Config contains the configuration for the host.

type Consensus

type Consensus struct {
	Network string `yaml:"network,omitempty"`
}

Consensus contains the configuration for the consensus set.

type HTTP

type HTTP struct {
	Address string `yaml:"address,omitempty"`
}

HTTP contains the configuration for the HTTP server.

type Index

type Index struct {
	BatchSize int `yaml:"batchSize,omitempty"`
}

Index contains the configuration for the blockchain indexer

type Log

type Log struct {
	Level  string  `yaml:"level,omitempty"` // global log level
	StdOut StdOut  `yaml:"stdout,omitempty"`
	File   LogFile `yaml:"file,omitempty"`
}

Log contains the configuration for the logger.

type LogFile

type LogFile struct {
	Enabled bool   `yaml:"enabled,omitempty"`
	Level   string `yaml:"level,omitempty"` // override the file log level
	Format  string `yaml:"format,omitempty"`
	// Path is the path of the log file.
	Path string `yaml:"path,omitempty"`
}

LogFile configures the file output of the logger.

type Scanner

type Scanner struct {
	Threads             int           `yaml:"threads,omitempty"`
	Timeout             time.Duration `yaml:"timeout,omitempty"`
	MaxLastScan         time.Duration `yaml:"maxLastScan,omitempty"`
	MinLastAnnouncement time.Duration `yaml:"minLastAnnouncement,omitempty"`
}

Scanner contains the configuration for the host scanner.

type StdOut

type StdOut struct {
	Level      string `yaml:"level,omitempty"` // override the stdout log level
	Enabled    bool   `yaml:"enabled,omitempty"`
	Format     string `yaml:"format,omitempty"`
	EnableANSI bool   `yaml:"enableANSI,omitempty"` //nolint:tagliatelle
}

StdOut configures the standard output of the logger.

type Syncer

type Syncer struct {
	Address    string   `yaml:"address,omitempty"`
	Bootstrap  bool     `yaml:"bootstrap,omitempty"`
	EnableUPNP bool     `yaml:"enableUPnP,omitempty"`
	Peers      []string `yaml:"peers,omitempty"`
}

Syncer contains the configuration for the syncer.

Jump to

Keyboard shortcuts

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