miner_manager

package
v1.13.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CoMinersLimit = 20000

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("not found")
)

Functions

func NewVenusAuth

func NewVenusAuth(url, token string) func() (jwtclient.IAuthClient, error)

Types

type MinerManage

type MinerManage struct {
	// contains filtered or unexported fields
}

func (*MinerManage) CloseMining

func (m *MinerManage) CloseMining(ctx context.Context, mAddr address.Address) error

func (*MinerManage) Get

func (m *MinerManage) Get(ctx context.Context, mAddr address.Address) (*types.MinerInfo, error)

func (*MinerManage) Has

func (m *MinerManage) Has(ctx context.Context, mAddr address.Address) bool

func (*MinerManage) IsOpenMining

func (m *MinerManage) IsOpenMining(ctx context.Context, mAddr address.Address) bool

func (*MinerManage) List

func (m *MinerManage) List(ctx context.Context) (map[address.Address]*types.MinerInfo, error)

func (*MinerManage) OpenMining

func (m *MinerManage) OpenMining(ctx context.Context, mAddr address.Address) (*types.MinerInfo, error)

func (*MinerManage) Update

func (m *MinerManage) Update(ctx context.Context, skip, limit int64) (map[address.Address]*types.MinerInfo, error)

type MinerManageAPI

type MinerManageAPI interface {
	Has(ctx context.Context, mAddr address.Address) bool
	Get(ctx context.Context, mAddr address.Address) (*types.MinerInfo, error)
	IsOpenMining(ctx context.Context, mAddr address.Address) bool
	OpenMining(ctx context.Context, mAddr address.Address) (*types.MinerInfo, error)
	CloseMining(ctx context.Context, mAddr address.Address) error
	List(ctx context.Context) (map[address.Address]*types.MinerInfo, error)
	Update(ctx context.Context, skip, limit int64) (map[address.Address]*types.MinerInfo, error)
}

func NewMinerManager

func NewMinerManager(authClient jwtclient.IAuthClient) (MinerManageAPI, error)

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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