Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// DefaultDexDir dex home dir
DefaultDexDir = "lkdex"
)
Functions ¶
func DefaultLogLevel ¶
func DefaultLogLevel() string
DefaultLogLevel returns a default log level of "info"
func DefaultRotateConfig ¶
func DefaultRotateConfig() *log.RotateConfig
DefaultRotateConfig returns default roate config
Types ¶
type BaseConfig ¶
type BaseConfig struct { Password string `mapstructure:"password"` PasswordFile string `mapstructure:"password_file"` KeystoreFile string `mapstructure:"keystore_file"` KdfRounds int `mapstructure:"kdf_rounds"` Detach bool `mapstructure:"detach"` MaxConcurrency int `mapstructure:"max_concurrency"` Pidfile string `mapstructure:"pidfile"` LogLevel string `mapstructure:"log_level"` // The root directory for all data. // This should be set in viper so it can unmarshal into this struct RootDir string `mapstructure:"home"` // Database backend: leveldb | memdb DBBackend string `mapstructure:"db_backend"` // Database directory DBPath string `mapstructure:"db_path"` // KeyStore directory KeyStorePath string `mapstructure:"keystore_dir"` // LogPath directory LogPath string `mapstructure:"log_dir"` LogFile string `mapstructure:"log_file"` TestNet bool `mapstructure:"test_net"` ContractAddr string `mapstructure:"contract_addr"` }
BaseConfig define
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
DefaultBaseConfig return default config
func (BaseConfig) DBDir ¶
func (cfg BaseConfig) DBDir() string
DBDir returns the full path to the database directory
func (BaseConfig) KeyStoreDir ¶
func (cfg BaseConfig) KeyStoreDir() string
KeyStoreDir returns the full path to the keystore directory
func (BaseConfig) LogDir ¶
func (cfg BaseConfig) LogDir() string
LogDir returns the full path to the log directory
func (BaseConfig) PidFileDir ¶
func (cfg BaseConfig) PidFileDir() string
PidFileDir returns the full path to the pid file directory
func (BaseConfig) SavePid ¶
func (cfg BaseConfig) SavePid() error
type Config ¶
type Config struct { // Top level options use an anonymous struct BaseConfig `mapstructure:",squash"` Daemon *DaemonConfig `mapstructure:"daemon"` WalletDaemon *DaemonConfig `mapstructure:"wallet_daemon"` RPC *RPCConfig `mapstructure:"rpc"` Log *log.RotateConfig `mapstructure:"log"` }
Config config struct
type DaemonConfig ¶
type DaemonConfig struct { PeerRPC string `mapstructure:"peer_rpc"` PeerWS string `mapstructure:"peer_ws"` Login string `mapstructure:"login"` Trusted bool `mapstructure:"trusted"` Testnet bool `mapstructure:"testnet"` }
DaemonConfig daemon config
func DefaultDaemonConfig ¶
func DefaultDaemonConfig() *DaemonConfig
DefaultDaemonConfig returns default daemon config
func DefaultWalletDaemonConfig ¶
func DefaultWalletDaemonConfig() *DaemonConfig
DefaultDaemonConfig returns default daemon config
type RPCConfig ¶
type RPCConfig struct { IpcEndpoint string `mapstructure:"ipc_endpoint"` HTTPEndpoint string `mapstructure:"http_endpoint"` HTTPModules []string `mapstructure:"http_modules"` HTTPCores []string `mapstructure:"http_cores"` VHosts []string `mapstructure:"vhosts"` WSEndpoint string `mapstructure:"ws_endpoint"` WSModules []string `mapstructure:"ws_modules"` WSOrigins []string `mapsturcture:"ws_origins"` WSExposeAll bool `mapstructure:"ws_expose_all"` }
RPCConfig rpc config
func DefaultRPCConfig ¶
func DefaultRPCConfig() *RPCConfig
DefaultRPCConfig returns default rpc config
Click to show internal directories.
Click to hide internal directories.