lotus/api/api_worker.go

28 lines
804 B
Go
Raw Normal View History

2020-03-11 01:57:52 +00:00
package api
import (
"context"
"github.com/filecoin-project/sector-storage/sealtasks"
"github.com/filecoin-project/sector-storage/stores"
2020-04-23 22:23:20 +00:00
"github.com/filecoin-project/sector-storage/storiface"
"github.com/filecoin-project/specs-actors/actors/abi"
2020-03-11 01:57:52 +00:00
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/lotus/build"
)
type WorkerApi interface {
Version(context.Context) (build.Version, error)
// TODO: Info() (name, ...) ?
2020-03-23 11:40:02 +00:00
TaskTypes(context.Context) (map[sealtasks.TaskType]struct{}, error) // TaskType -> Weight
2020-03-13 11:59:19 +00:00
Paths(context.Context) ([]stores.StoragePath, error)
2020-04-23 22:23:20 +00:00
Info(context.Context) (storiface.WorkerInfo, error)
2020-03-11 01:57:52 +00:00
storage.Sealer
Fetch(context.Context, abi.SectorID, stores.SectorFileType, bool) error
Closing(context.Context) (<-chan struct{}, error)
2020-03-11 01:57:52 +00:00
}