Documentation ¶
Index ¶
- Constants
- Variables
- func NewVenusAuth(url, token string) func() (jwtclient.IAuthClient, error)
- type MinerManage
- func (m *MinerManage) CloseMining(ctx context.Context, mAddr address.Address) error
- func (m *MinerManage) Get(ctx context.Context, mAddr address.Address) (*types.MinerInfo, error)
- func (m *MinerManage) Has(ctx context.Context, mAddr address.Address) bool
- func (m *MinerManage) IsOpenMining(ctx context.Context, mAddr address.Address) bool
- func (m *MinerManage) List(ctx context.Context) (map[address.Address]*types.MinerInfo, error)
- func (m *MinerManage) OpenMining(ctx context.Context, mAddr address.Address) (*types.MinerInfo, error)
- func (m *MinerManage) Update(ctx context.Context, skip, limit int64) (map[address.Address]*types.MinerInfo, error)
- type MinerManageAPI
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) 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) OpenMining ¶
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)
Click to show internal directories.
Click to hide internal directories.