Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = uint(0) DefaultAddress = "0.0.0.0" DefaultRole = "worker" DefaultConcurrency = uint(node.DefaultConcurrency) DefaultUseWebsocket = false DefaultLogLevel = "info" )
Default values.
View Source
const ( DefaultDBName = "db" DefaultWorkspaceName = "workspace" )
Default names for storage directories.
View Source
const (
EnvDelimiter = "_"
)
Variables ¶
View Source
var DefaultConfig = Config{ Role: DefaultRole, Concurrency: DefaultConcurrency, Log: Log{ Level: DefaultLogLevel, }, Connectivity: Connectivity{ Address: DefaultAddress, Port: DefaultPort, Websocket: DefaultUseWebsocket, }, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Role string `koanf:"role" flag:"role,r"` Concurrency uint `koanf:"concurrency" flag:"concurrency,c"` BootNodes []string `koanf:"boot-nodes" flag:"boot-nodes"` Workspace string `koanf:"workspace" flag:"workspace"` // TODO: Check - does a head node ever use a workspace? LoadAttributes bool `koanf:"load-attributes" flag:"load-attributes"` // TODO: Head node probably doesn't need attributes..? Topics []string `koanf:"topics" flag:"topics"` DB string `koanf:"db" flag:"db"` Log Log `koanf:"log"` Connectivity Connectivity `koanf:"connectivity"` Head Head `koanf:"head"` Worker Worker `koanf:"worker"` Telemetry Telemetry `koanf:"telemetry"` }
Config describes the Blockless configuration options. NOTE: DO NOT use TABS in struct tags - spaces only! NOTE: When adding CLI flags (using the `flag` struct tag) - add the description for (for the flag long version, not the shorthand) it in getFlagDescription() below.
type ConfigOption ¶ added in v0.6.0
type ConfigOption struct { Name string `yaml:"name,omitempty"` FullPath string `yaml:"full_path,omitempty"` CLI CLIFlag `yaml:"cli,omitempty"` Env string `yaml:"env-var,omitempty"` Children []ConfigOption `yaml:"children,omitempty"` // contains filtered or unexported fields }
func GetConfigDocumentation ¶ added in v0.6.0
func GetConfigDocumentation() []ConfigOption
func (ConfigOption) Info ¶ added in v0.6.0
func (c ConfigOption) Info() ConfigOptionInfo
func (ConfigOption) Type ¶ added in v0.6.0
func (c ConfigOption) Type() string
type ConfigOptionInfo ¶ added in v0.6.0
type ConfigOptionInfo struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` FullPath string `json:"full_path,omitempty" yaml:"full_path,omitempty"` CLI CLIFlag `json:"cli,omitempty" yaml:"cli,omitempty"` Env string `json:"env-var,omitempty" yaml:"env-var,omitempty"` Children []ConfigOption `json:"children,omitempty" yaml:"children,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` }
ConfigOptionInfo describes a specific configuration option, it's location in the config file and corresponding CLI flags and environment variables. It can be used to generate documentation for the b7s node.
type Connectivity ¶ added in v0.6.0
type Connectivity struct { Address string `koanf:"address" flag:"address,a"` Port uint `koanf:"port" flag:"port,p"` PrivateKey string `koanf:"private-key" flag:"private-key"` DialbackAddress string `koanf:"dialback-address" flag:"dialback-address"` DialbackPort uint `koanf:"dialback-port" flag:"dialback-port"` Websocket bool `koanf:"websocket" flag:"websocket,w"` WebsocketPort uint `koanf:"websocket-port" flag:"websocket-port"` WebsocketDialbackPort uint `koanf:"websocket-dialback-port" flag:"websocket-dialback-port"` NoDialbackPeers bool `koanf:"no-dialback-peers" flag:"no-dialback-peers"` MustReachBootNodes bool `koanf:"must-reach-boot-nodes" flag:"must-reach-boot-nodes"` DisableConnectionLimits bool `koanf:"disable-connection-limits" flag:"disable-connection-limits"` ConnectionCount uint `koanf:"connection-count" flag:"connection-count"` }
Connectivity describes the libp2p host that the node will use.
type GRPCTracing ¶ added in v0.7.0
type GRPCTracing struct {
Endpoint string `koanf:"endpoint" flag:"tracing-grpc-endpoint"`
}
type HTTPTracing ¶ added in v0.7.0
type HTTPTracing struct {
Endpoint string `koanf:"endpoint" flag:"tracing-http-endpoint"`
}
type Log ¶
type Log struct {
Level string `koanf:"level" flag:"log-level,l"`
}
Log describes the logging configuration.
type Tracing ¶ added in v0.7.0
type Tracing struct { Enable bool `koanf:"enable" flag:"enable-tracing"` ExporterBatchTimeout time.Duration `koanf:"exporter-batch-timeout"` GRPC GRPCTracing `koanf:"grpc"` HTTP HTTPTracing `koanf:"http"` }
Click to show internal directories.
Click to hide internal directories.