Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDB ¶
type BaseDB struct { MaxConns int `json:"maxConns"` MaxConnLifetime int64 `json:"maxConnLifetime"` // in seconds Threads int `json:"threads"` Retry Retry `json:"retry"` Timeout int64 `json:"timeout"` // in seconds }
BaseDB type definition for db configuration
type BaseRPC ¶
type BaseRPC struct { Threads int `json:"threads"` Timeout int `json:"timeout"` Retry Retry `json:"retry"` }
BaseRPC type definition for base rpc configuration
type Coin ¶
type Coin struct { Name string `json:"name"` RPC CoinRPC `json:"rpc"` ZMQ ZMQ `json:"zmq"` DB CoinDB `json:"db"` }
Coin type definition for coin rpc and zmq config variables
type CoinRPC ¶
type CoinRPC struct { URL string `json:"url"` User string `json:"user"` Password string `json:"password"` }
CoinRPC type definition for coin rpc configuration
type Config ¶
Config type definition for all config variables
func (*Config) GetDBConfig ¶
func (c *Config) GetDBConfig(db DatabaseType, cc *Coin) (*DB, error)
GetDBConfig will return a DB that consists of the BaseDB along with the specified CoinDB
func (*Config) GetRPCConfig ¶
GetRPCConfig will return RPC that consists of the BaseRPC along with the specified CoinRPC
type DatabaseType ¶
type DatabaseType int
DatabaseType represents which db endpoint to be used
const ( ReadOnly DatabaseType = iota ReadWrite )
The defined database types are as follows
func (DatabaseType) String ¶
func (a DatabaseType) String() string
String take the enum index and print out the associated name
Click to show internal directories.
Click to hide internal directories.