config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 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,omitempty"`
	Directory      string `yaml:"directory,omitempty"`
	RecoveryPhrase string `yaml:"recoveryPhrase,omitempty"`
	AutoOpenWebUI  bool   `yaml:"autoOpenWebUI,omitempty"`

	HTTP      HTTP         `yaml:"http,omitempty"`
	Consensus Consensus    `yaml:"consensus,omitempty"`
	Explorer  ExplorerData `yaml:"explorer,omitempty"`
	RHP2      RHP2         `yaml:"rhp2,omitempty"`
	RHP3      RHP3         `yaml:"rhp3,omitempty"`
	Log       Log          `yaml:"log,omitempty"`
}

Config contains the configuration for the host.

type Consensus

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

Consensus contains the configuration for the consensus set.

type ExplorerData added in v1.0.4

type ExplorerData struct {
	Disable bool   `yaml:"disable,omitempty"`
	URL     string `yaml:"url,omitempty"`
}

ExplorerData contains the configuration for using an external explorer.

type HTTP

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

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,omitempty"`
	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 added in v1.0.1

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 RHP2

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

RHP2 contains the configuration for the RHP2 server.

type RHP3

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

RHP3 contains the configuration for the RHP3 server.

type StdOut added in v1.0.1

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.

Jump to

Keyboard shortcuts

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