config

package
v1.0.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 0 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 {
	Name           string `yaml:"name"`
	Directory      string `yaml:"directory"`
	RecoveryPhrase string `yaml:"recoveryPhrase"`
	AutoOpenWebUI  bool   `yaml:"autoOpenWebUI"`

	HTTP      HTTP      `yaml:"http"`
	Consensus Consensus `yaml:"consensus"`
	RHP2      RHP2      `yaml:"rhp2"`
	RHP3      RHP3      `yaml:"rhp3"`
	Log       Log       `yaml:"log"`
}

Config contains the configuration for the host.

type Consensus

type Consensus struct {
	GatewayAddress string   `yaml:"gatewayAddress"`
	Bootstrap      bool     `yaml:"bootstrap"`
	Peers          []string `toml:"peers,omitempty"`
}

Consensus contains the configuration for the consensus set.

type HTTP

type HTTP struct {
	Address  string `yaml:"address"`
	Password string `yaml:"password"`
}

HTTP contains the configuration for the HTTP server.

type Log

type Log struct {
	// Path is the directory to store the hostd.log file.
	// Deprecated: use File.Path instead.
	Path   string  `yaml:"path"`
	Level  string  `yaml:"level"` // global log level
	StdOut StdOut  `yaml:"stdout"`
	File   LogFile `yaml:"file"`
}

Log contains the configuration for the logger.

type LogFile added in v1.0.1

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

LogFile configures the file output of the logger.

type RHP2

type RHP2 struct {
	Address string `yaml:"address"`
}

RHP2 contains the configuration for the RHP2 server.

type RHP3

type RHP3 struct {
	TCPAddress       string `yaml:"tcp"`
	WebSocketAddress string `yaml:"websocket"`
	CertPath         string `yaml:"certPath"`
	KeyPath          string `yaml:"keyPath"`
}

RHP3 contains the configuration for the RHP3 server.

type StdOut added in v1.0.1

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

StdOut configures the standard output of the logger.

Jump to

Keyboard shortcuts

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