2023-12-03 06:40:01 +00:00
|
|
|
package api
|
|
|
|
|
2024-01-20 14:52:38 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"net/http"
|
|
|
|
"net/url"
|
|
|
|
|
2024-02-11 13:08:54 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
2024-02-24 10:11:57 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2024-02-11 13:08:54 +00:00
|
|
|
|
2024-05-22 08:08:32 +00:00
|
|
|
lpiece "github.com/filecoin-project/lotus/storage/pipeline/piece"
|
2024-02-08 15:28:34 +00:00
|
|
|
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
|
|
|
|
"github.com/filecoin-project/lotus/storage/sealer/storiface"
|
2024-01-20 14:52:38 +00:00
|
|
|
)
|
2023-12-03 06:40:01 +00:00
|
|
|
|
2024-03-15 21:38:13 +00:00
|
|
|
type Curio interface {
|
2023-12-03 06:40:01 +00:00
|
|
|
Version(context.Context) (Version, error) //perm:admin
|
|
|
|
|
2024-05-22 08:08:32 +00:00
|
|
|
AllocatePieceToSector(ctx context.Context, maddr address.Address, piece lpiece.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (SectorOffset, error) //perm:write
|
2024-01-20 14:52:38 +00:00
|
|
|
|
2024-04-26 08:26:57 +00:00
|
|
|
StorageInit(ctx context.Context, path string, opts storiface.LocalStorageMeta) error //perm:admin
|
2024-02-24 10:11:57 +00:00
|
|
|
StorageAddLocal(ctx context.Context, path string) error //perm:admin
|
|
|
|
StorageDetachLocal(ctx context.Context, path string) error //perm:admin
|
|
|
|
StorageList(ctx context.Context) (map[storiface.ID][]storiface.Decl, error) //perm:admin
|
|
|
|
StorageLocal(ctx context.Context) (map[storiface.ID]string, error) //perm:admin
|
|
|
|
StorageStat(ctx context.Context, id storiface.ID) (fsutil.FsStat, error) //perm:admin
|
|
|
|
StorageInfo(context.Context, storiface.ID) (storiface.StorageInfo, error) //perm:admin
|
|
|
|
StorageFindSector(ctx context.Context, sector abi.SectorID, ft storiface.SectorFileType, ssize abi.SectorSize, allowFetch bool) ([]storiface.SectorStorageInfo, error) //perm:admin
|
2024-02-08 12:27:46 +00:00
|
|
|
|
2024-04-16 00:29:56 +00:00
|
|
|
LogList(ctx context.Context) ([]string, error) //perm:read
|
|
|
|
LogSetLevel(ctx context.Context, subsystem, level string) error //perm:admin
|
|
|
|
|
2023-12-03 06:40:01 +00:00
|
|
|
// Trigger shutdown
|
|
|
|
Shutdown(context.Context) error //perm:admin
|
|
|
|
}
|