Documentation ¶
Index ¶
- func Check(cfg *MinerConfig) error
- func ConfigComment(t interface{}) ([]byte, error)
- func FromFile(path string, def interface{}) (interface{}, error)
- func FromReader(reader io.Reader, def interface{}) (interface{}, error)
- type API
- type APIInfo
- type Duration
- type GatewayNode
- type MinerConfig
- type MySQLConfig
- type SlashFilterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(cfg *MinerConfig) error
func ConfigComment ¶
func FromFile ¶
FromFile loads config from a specified file overriding defaults specified in the def parameter. If file does not exist or is empty defaults are assumed.
func FromReader ¶
FromReader loads config from a reader instance.
Types ¶
type APIInfo ¶
func (APIInfo) AuthHeader ¶
type Duration ¶
Duration is a wrapper type for Duration for decoding and encoding from/to TOML
func (Duration) MarshalText ¶
func (*Duration) UnmarshalText ¶
UnmarshalText implements interface for TOML decoding
type GatewayNode ¶
func (*GatewayNode) AuthHeader ¶
func (gw *GatewayNode) AuthHeader() http.Header
func (*GatewayNode) DialArgs ¶
func (gw *GatewayNode) DialArgs() ([]string, error)
type MinerConfig ¶
type MinerConfig struct { API API FullNode *APIInfo Gateway *GatewayNode Auth *APIInfo SubmitNodes []*APIInfo PropagationDelaySecs uint64 MpoolSelectDelaySecs uint64 MinerOnceTimeout Duration SlashFilter *SlashFilterConfig Tracing *metrics.TraceConfig Metrics *metrics.MetricsConfig }
func DefaultMinerConfig ¶
func DefaultMinerConfig() *MinerConfig
type MySQLConfig ¶
type SlashFilterConfig ¶
type SlashFilterConfig struct { Type string MySQL MySQLConfig }
Click to show internal directories.
Click to hide internal directories.