Documentation ¶
Index ¶
- type GatewayRecord
- type GatewayRecorder
- type MinerRecord
- func (m *MinerRecord) AddToBlacklist(account, addr, reason string)
- func (m *MinerRecord) AddToWhitelist(account string, info Minerinfo)
- func (m *MinerRecord) BackupBlacklist(path string) error
- func (m *MinerRecord) BackupMinerlist(path string) error
- func (m *MinerRecord) BackupWhitelist(path string) error
- func (m *MinerRecord) DeleteMinerinfo(account string)
- func (m *MinerRecord) GetAllBlacklist() map[string]Reason
- func (m *MinerRecord) GetAllMinerAccount() []string
- func (m *MinerRecord) GetAllMinerinfos() []Minerinfo
- func (m *MinerRecord) GetAllWhitelist() []string
- func (m *MinerRecord) GetAllWhitelistInfos() []Minerinfo
- func (m *MinerRecord) GetBlacklistInfo(account string) (Reason, bool)
- func (m *MinerRecord) GetMinerinfo(account string) (Minerinfo, bool)
- func (m *MinerRecord) HasMinerinfo(account string) bool
- func (m *MinerRecord) IsInBlacklist(account string) bool
- func (m *MinerRecord) LoadBlacklist(path string) error
- func (m *MinerRecord) LoadMinerlist(path string) error
- func (m *MinerRecord) LoadWhitelist(path string) error
- func (m *MinerRecord) RemoveFromBlacklist(account string)
- func (m *MinerRecord) SaveMinerinfo(account string, addr string, state string, idlespace uint64)
- type MinerRecorder
- type Minerinfo
- type Reason
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayRecord ¶
type GatewayRecord struct {
// contains filtered or unexported fields
}
func (*GatewayRecord) GetAllGatewayAddrs ¶
func (g *GatewayRecord) GetAllGatewayAddrs() []string
func (*GatewayRecord) SaveGatewayRecord ¶
func (g *GatewayRecord) SaveGatewayRecord(account, addr string)
type GatewayRecorder ¶
type GatewayRecorder interface { SaveGatewayRecord(account, addr string) GetAllGatewayAddrs() []string }
func NewGatewayRecord ¶
func NewGatewayRecord() GatewayRecorder
type MinerRecord ¶
type MinerRecord struct {
// contains filtered or unexported fields
}
func (*MinerRecord) AddToBlacklist ¶
func (m *MinerRecord) AddToBlacklist(account, addr, reason string)
func (*MinerRecord) AddToWhitelist ¶
func (m *MinerRecord) AddToWhitelist(account string, info Minerinfo)
func (*MinerRecord) BackupBlacklist ¶
func (m *MinerRecord) BackupBlacklist(path string) error
func (*MinerRecord) BackupMinerlist ¶
func (m *MinerRecord) BackupMinerlist(path string) error
func (*MinerRecord) BackupWhitelist ¶
func (m *MinerRecord) BackupWhitelist(path string) error
func (*MinerRecord) DeleteMinerinfo ¶
func (m *MinerRecord) DeleteMinerinfo(account string)
func (*MinerRecord) GetAllBlacklist ¶
func (m *MinerRecord) GetAllBlacklist() map[string]Reason
func (*MinerRecord) GetAllMinerAccount ¶
func (m *MinerRecord) GetAllMinerAccount() []string
func (*MinerRecord) GetAllMinerinfos ¶
func (m *MinerRecord) GetAllMinerinfos() []Minerinfo
func (*MinerRecord) GetAllWhitelist ¶
func (m *MinerRecord) GetAllWhitelist() []string
func (*MinerRecord) GetAllWhitelistInfos ¶
func (m *MinerRecord) GetAllWhitelistInfos() []Minerinfo
func (*MinerRecord) GetBlacklistInfo ¶
func (m *MinerRecord) GetBlacklistInfo(account string) (Reason, bool)
func (*MinerRecord) GetMinerinfo ¶
func (m *MinerRecord) GetMinerinfo(account string) (Minerinfo, bool)
func (*MinerRecord) HasMinerinfo ¶
func (m *MinerRecord) HasMinerinfo(account string) bool
func (*MinerRecord) IsInBlacklist ¶
func (m *MinerRecord) IsInBlacklist(account string) bool
func (*MinerRecord) LoadBlacklist ¶
func (m *MinerRecord) LoadBlacklist(path string) error
func (*MinerRecord) LoadMinerlist ¶
func (m *MinerRecord) LoadMinerlist(path string) error
func (*MinerRecord) LoadWhitelist ¶
func (m *MinerRecord) LoadWhitelist(path string) error
func (*MinerRecord) RemoveFromBlacklist ¶
func (m *MinerRecord) RemoveFromBlacklist(account string)
func (*MinerRecord) SaveMinerinfo ¶
func (m *MinerRecord) SaveMinerinfo(account string, addr string, state string, idlespace uint64)
type MinerRecorder ¶
type MinerRecorder interface { // SaveMinerinfo add or update miner information SaveMinerinfo(account string, addr string, state string, idle_space uint64) // DeleteMinerinfo delete miner information DeleteMinerinfo(account string) // HasMinerinfo whether miner information is recorded HasMinerinfo(account string) bool // GetMinerinfo(account string) (Minerinfo, bool) // GetAllMinerAccount() []string // GetAllMinerinfos() []Minerinfo // GetAllWhitelist() []string // GetAllWhitelistInfos() []Minerinfo // AddToWhitelist(account string, info Minerinfo) // AddToBlacklist(account, addr, reason string) // RemoveFromBlacklist(account string) // IsInBlacklist(account string) bool // GetAllBlacklist() map[string]Reason // GetBlacklistInfo(account string) (Reason, bool) // BackupMinerlist(path string) error // LoadMinerlist(path string) error // BackupBlacklist(path string) error // LoadBlacklist(path string) error // BackupWhitelist(path string) error // LoadWhitelist(path string) error }
func NewMinerRecord ¶
func NewMinerRecord() MinerRecorder
Click to show internal directories.
Click to hide internal directories.