impl

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0, MIT Imports: 30 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonAPI

type CommonAPI struct {
	fx.In

	APISecret *dtypes.APIAlg
	Host      host.Host
}

func (*CommonAPI) AuthNew

func (a *CommonAPI) AuthNew(ctx context.Context, perms []api.Permission) ([]byte, error)

func (*CommonAPI) AuthVerify

func (a *CommonAPI) AuthVerify(ctx context.Context, token string) ([]api.Permission, error)

func (*CommonAPI) ID

func (a *CommonAPI) ID(context.Context) (peer.ID, error)

func (*CommonAPI) NetAddrsListen

func (a *CommonAPI) NetAddrsListen(context.Context) (peer.AddrInfo, error)

func (*CommonAPI) NetConnect

func (a *CommonAPI) NetConnect(ctx context.Context, p peer.AddrInfo) error

func (*CommonAPI) NetConnectedness

func (a *CommonAPI) NetConnectedness(ctx context.Context, pid peer.ID) (network.Connectedness, error)

func (*CommonAPI) NetDisconnect

func (a *CommonAPI) NetDisconnect(ctx context.Context, p peer.ID) error

func (*CommonAPI) NetPeers

func (a *CommonAPI) NetPeers(context.Context) ([]peer.AddrInfo, error)

func (*CommonAPI) Version

func (a *CommonAPI) Version(context.Context) (api.Version, error)

type StorageMinerAPI

type StorageMinerAPI struct {
	CommonAPI

	SectorBuilderConfig *sectorbuilder.Config
	SectorBuilder       sectorbuilder.Interface
	SectorBlocks        *sectorblocks.SectorBlocks

	Miner      *storage.Miner
	BlockMiner *miner.Miner
	Full       api.FullNode
}

func (*StorageMinerAPI) ActorAddress

func (sm *StorageMinerAPI) ActorAddress(context.Context) (address.Address, error)

func (*StorageMinerAPI) ActorSectorSize

func (sm *StorageMinerAPI) ActorSectorSize(ctx context.Context, addr address.Address) (uint64, error)

func (*StorageMinerAPI) PledgeSector

func (sm *StorageMinerAPI) PledgeSector(ctx context.Context) error

func (*StorageMinerAPI) SectorsList

func (sm *StorageMinerAPI) SectorsList(context.Context) ([]uint64, error)

List all staged sectors

func (*StorageMinerAPI) SectorsRefs

func (sm *StorageMinerAPI) SectorsRefs(context.Context) (map[string][]api.SealedRef, error)

func (*StorageMinerAPI) SectorsStatus

func (sm *StorageMinerAPI) SectorsStatus(ctx context.Context, sid uint64) (api.SectorInfo, error)

func (*StorageMinerAPI) SectorsUpdate

func (sm *StorageMinerAPI) SectorsUpdate(ctx context.Context, id uint64, state api.SectorState) error

func (*StorageMinerAPI) ServeRemote

func (sm *StorageMinerAPI) ServeRemote(w http.ResponseWriter, r *http.Request)

func (*StorageMinerAPI) WorkerDone

func (sm *StorageMinerAPI) WorkerDone(ctx context.Context, task uint64, res sectorbuilder.SealRes) error

func (*StorageMinerAPI) WorkerQueue

func (sm *StorageMinerAPI) WorkerQueue(ctx context.Context, cfg sectorbuilder.WorkerCfg) (<-chan sectorbuilder.WorkerTask, error)

func (*StorageMinerAPI) WorkerStats

func (sm *StorageMinerAPI) WorkerStats(context.Context) (sectorbuilder.WorkerStats, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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