checker

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentStatusNormal      = 2
	AgentStatusDownloading = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentStatus

type AgentStatus struct {
	Status       int   `json:"status,omitempty"`
	NeedDownload int64 `json:"need_download,omitempty"`
}

type Checker

type Checker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func InitChecker

func InitChecker(conf config.Config, parentCtx context.Context) Checker

func (Checker) Check

func (c Checker) Check(ch chan types.Sector)

checker will get downloadable sectors and send it to channel ch

func (Checker) Ping

func (c Checker) Ping()

func (Checker) Stop

func (c Checker) Stop()

type Data

type Data struct {
	List []DataItem `json:"list,omitempty"`
}

type DataItem

type DataItem struct {
	MinerID    string `json:"minerId,omitempty"`
	SectorId   string `json:"sectorId,omitempty"`
	SectorType string `json:"sectorType,omitempty"`
}

Jump to

Keyboard shortcuts

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