config

package
v0.0.0-...-a529750 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConfig

type BaseConfig interface {
	Validate() []error
}

type CrawlerConfig

type CrawlerConfig struct {
	CrawlerName   string
	CrawlInterval int
	LoggingLevel  string
	LoggingFile   string
	Miners        []MinerConfig
	Redis         RedisConfig
}

func (*CrawlerConfig) Validate

func (c *CrawlerConfig) Validate() []error

type HiveConfig

type HiveConfig struct {
	LoggingLevel string
	LoggingFile  string
	Port         uint
	Token        string
	Redis        RedisConfig
}

func (*HiveConfig) Validate

func (h *HiveConfig) Validate() []error

type MinerConfig

type MinerConfig struct {
	MinerName string
	Host      string
	Port      uint
	Model     constants.MinerSeries
}

func (*MinerConfig) GetAddress

func (m *MinerConfig) GetAddress() string

func (*MinerConfig) Validate

func (m *MinerConfig) Validate() []error

type RedisConfig

type RedisConfig struct {
	Host             string
	Port             uint
	Username         string
	Password         string
	SelectedDatabase int
}

func (*RedisConfig) GetAddress

func (r *RedisConfig) GetAddress() string

func (*RedisConfig) Validate

func (r *RedisConfig) Validate() []error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL