sprawl: github.com/sprawl/sprawl/config Index | Files

package config

import "github.com/sprawl/sprawl/config"


Package Files


type Config Uses

type Config struct {
    // contains filtered or unexported fields

Config has an initialized version of spf13/viper

func (*Config) AddBoolean Uses

func (c *Config) AddBoolean(key string)

AddBoolean to config and print a message, if default is used.

func (*Config) AddBooleanE Uses

func (c *Config) AddBooleanE(key string) error

AddBooleanE (default false) to config and return error

func (*Config) AddString Uses

func (c *Config) AddString(key string)

AddString to config and print a message, if default is used.

func (*Config) AddStringE Uses

func (c *Config) AddStringE(key string) error

AddStringE (default "") to config and return error

func (*Config) AddUint Uses

func (c *Config) AddUint(key string)

AddUint to config and print a message, if default is used.

func (*Config) AddUintE Uses

func (c *Config) AddUintE(key string) error

AddUintE (default 0) to config and return error

func (*Config) GetAutoRelaySetting Uses

func (c *Config) GetAutoRelaySetting() bool

GetAutoRelaySetting defines whether to run the node in autorelay mode or not

func (*Config) GetDatabasePath Uses

func (c *Config) GetDatabasePath() string

GetDatabasePath defines the host directory for the database

func (*Config) GetDebugSetting Uses

func (c *Config) GetDebugSetting() bool

GetDebugSetting defines whether to run the debug pinger or not

func (*Config) GetExternalIP Uses

func (c *Config) GetExternalIP() string

GetExternalIP defines the listened external IP for P2P

func (*Config) GetIPFSPeerSetting Uses

func (c *Config) GetIPFSPeerSetting() bool

GetIPFSPeerSetting defines if we use IPFS bootstrap peers for discovery or just our own

func (*Config) GetInMemoryDatabaseSetting Uses

func (c *Config) GetInMemoryDatabaseSetting() bool

GetInMemoryDatabaseSetting defines if RAM is used instead of LevelDB for storage

func (*Config) GetLogFormat Uses

func (c *Config) GetLogFormat() string

GetLogFormat gets configured log format for uber/zap

func (*Config) GetLogLevel Uses

func (c *Config) GetLogLevel() string

GetLogLevel gets configured log level for uber/zap

func (*Config) GetNATPortMapSetting Uses

func (c *Config) GetNATPortMapSetting() bool

GetNATPortMapSetting defines whether to use NAT port mapping or not

func (*Config) GetP2PPort Uses

func (c *Config) GetP2PPort() uint

GetP2PPort defines the listened P2P port

func (*Config) GetRPCPort Uses

func (c *Config) GetRPCPort() uint

GetRPCPort defines the port the gRPC is running at

func (*Config) GetRelaySetting Uses

func (c *Config) GetRelaySetting() bool

GetRelaySetting defines whether to run the node in relay mode or not

func (*Config) GetStackTraceSetting Uses

func (c *Config) GetStackTraceSetting() bool

GetStackTraceSetting defines whether to run the debug pinger or not

func (*Config) GetWebsocketEnable Uses

func (c *Config) GetWebsocketEnable() bool

GetWebsocketEnable defines if websocket connections are allowed. Starts waiting http request using websocket.port

func (*Config) GetWebsocketPort Uses

func (c *Config) GetWebsocketPort() uint

GetWebsocketPort defines port for websocket connections. websocket.enable must be true or the port is not used.

func (*Config) ReadConfig Uses

func (c *Config) ReadConfig(configPath string)

ReadConfig opens the configuration file and initializes viper

Package config imports 5 packages (graph) and is imported by 2 packages. Updated 2020-02-20. Refresh now. Tools for package owners.