Documentation ¶
Index ¶
- type ClaimMinerBody
- type IMinerManager
- type MinerChainInfo
- type MinerManager
- func (mm *MinerManager) ClaimMiner(ctx context.Context, params ClaimMinerBody, u *util.User) error
- func (mm *MinerManager) ComputeSortedMinerList() ([]*minerDealStats, error)
- func (mm *MinerManager) EstimatePrice(ctx context.Context, repl int, pieceSize abi.PaddedPieceSize, ...) (*estimateResponse, error)
- func (mm *MinerManager) GetAsk(ctx context.Context, m address.Address, maxCacheAge time.Duration) (*model.MinerStorageAsk, error)
- func (mm *MinerManager) GetDealProtocolForMiner(ctx context.Context, miner address.Address) (protocol.ID, error)
- func (mm *MinerManager) GetMinerChainInfo(ctx context.Context, maddr address.Address) (*MinerChainInfo, error)
- func (mm *MinerManager) GetMsgForMinerClaim(miner address.Address, uid uint) []byte
- func (mm *MinerManager) PickMiners(ctx context.Context, n int, pieceSize abi.PaddedPieceSize, ...) ([]miner, error)
- func (mm *MinerManager) SetMinerInfo(m address.Address, params MinerSetInfoParams, u *util.User) error
- func (mm *MinerManager) SortedMinerList() ([]address.Address, []*minerDealStats, error)
- func (mm *MinerManager) SuspendMiner(m address.Address, params SuspendMinerBody, u *util.User) error
- func (mm *MinerManager) UnSuspendMiner(m address.Address, u *util.User) error
- type MinerSetInfoParams
- type SuspendMinerBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimMinerBody ¶
type IMinerManager ¶
type IMinerManager interface { EstimatePrice(ctx context.Context, repl int, pieceSize abi.PaddedPieceSize, duration abi.ChainEpoch, verified bool) (*estimateResponse, error) PickMiners(ctx context.Context, n int, pieceSize abi.PaddedPieceSize, exclude map[address.Address]bool, filterByPrice bool) ([]miner, error) GetDealProtocolForMiner(ctx context.Context, miner address.Address) (protocol.ID, error) ComputeSortedMinerList() ([]*minerDealStats, error) SortedMinerList() ([]address.Address, []*minerDealStats, error) GetAsk(ctx context.Context, m address.Address, maxCacheAge time.Duration) (*model.MinerStorageAsk, error) SetMinerInfo(m address.Address, params MinerSetInfoParams, u *util.User) error GetMsgForMinerClaim(miner address.Address, uid uint) []byte GetMinerChainInfo(ctx context.Context, maddr address.Address) (*MinerChainInfo, error) ClaimMiner(ctx context.Context, params ClaimMinerBody, u *util.User) error SuspendMiner(m address.Address, params SuspendMinerBody, u *util.User) error UnSuspendMiner(m address.Address, u *util.User) error }
func NewMinerManager ¶
type MinerChainInfo ¶ added in v0.3.9
type MinerManager ¶
type MinerManager struct {
// contains filtered or unexported fields
}
func (*MinerManager) ClaimMiner ¶
func (mm *MinerManager) ClaimMiner(ctx context.Context, params ClaimMinerBody, u *util.User) error
func (*MinerManager) ComputeSortedMinerList ¶
func (mm *MinerManager) ComputeSortedMinerList() ([]*minerDealStats, error)
func (*MinerManager) EstimatePrice ¶
func (mm *MinerManager) EstimatePrice(ctx context.Context, repl int, pieceSize abi.PaddedPieceSize, duration abi.ChainEpoch, verified bool) (*estimateResponse, error)
func (*MinerManager) GetAsk ¶
func (mm *MinerManager) GetAsk(ctx context.Context, m address.Address, maxCacheAge time.Duration) (*model.MinerStorageAsk, error)
func (*MinerManager) GetDealProtocolForMiner ¶
func (*MinerManager) GetMinerChainInfo ¶ added in v0.3.9
func (mm *MinerManager) GetMinerChainInfo(ctx context.Context, maddr address.Address) (*MinerChainInfo, error)
func (*MinerManager) GetMsgForMinerClaim ¶
func (mm *MinerManager) GetMsgForMinerClaim(miner address.Address, uid uint) []byte
func (*MinerManager) PickMiners ¶
func (mm *MinerManager) PickMiners(ctx context.Context, n int, pieceSize abi.PaddedPieceSize, exclude map[address.Address]bool, filterByPrice bool) ([]miner, error)
func (*MinerManager) SetMinerInfo ¶
func (mm *MinerManager) SetMinerInfo(m address.Address, params MinerSetInfoParams, u *util.User) error
func (*MinerManager) SortedMinerList ¶
func (mm *MinerManager) SortedMinerList() ([]address.Address, []*minerDealStats, error)
func (*MinerManager) SuspendMiner ¶
func (mm *MinerManager) SuspendMiner(m address.Address, params SuspendMinerBody, u *util.User) error
func (*MinerManager) UnSuspendMiner ¶
func (mm *MinerManager) UnSuspendMiner(m address.Address, u *util.User) error
type MinerSetInfoParams ¶
type MinerSetInfoParams struct {
Name string `json:"name"`
}
type SuspendMinerBody ¶
type SuspendMinerBody struct {
Reason string `json:"reason"`
}
Click to show internal directories.
Click to hide internal directories.