workers: Simple storage diagnostics

This commit is contained in:
Łukasz Magiera
2020-03-16 18:50:07 +01:00
parent 416a0d2722
commit 7e997e40f3
13 changed files with 209 additions and 46 deletions
+4
View File
@@ -108,6 +108,10 @@ type StorageMiner interface {
SectorsUpdate(context.Context, abi.SectorNumber, SectorState) error
StorageList(ctx context.Context) (map[stores.ID][]stores.Decl, error)
StorageInfo(context.Context, stores.ID) (stores.StorageInfo, error)
// WorkerConnect tells the node to connect to workers RPC
WorkerConnect(context.Context, string) error
stores.SectorIndex
+10
View File
@@ -185,6 +185,8 @@ type StorageMinerStruct struct {
WorkerAttachStorage func(context.Context, stores.StorageInfo) error `perm:"admin"`
StorageDeclareSector func(context.Context, stores.ID, abi.SectorID, sectorbuilder.SectorFileType) error `perm:"admin"`
StorageFindSector func(context.Context, abi.SectorID, sectorbuilder.SectorFileType) ([]stores.StorageInfo, error) `perm:"admin"`
StorageList func(ctx context.Context) (map[stores.ID][]stores.Decl, error) `perm:"admin"`
StorageInfo func(context.Context, stores.ID) (stores.StorageInfo, error) `perm:"admin"`
DealsImportData func(ctx context.Context, dealPropCid cid.Cid, file string) error `perm:"write"`
DealsList func(ctx context.Context) ([]storagemarket.StorageDeal, error) `perm:"read"`
@@ -664,6 +666,14 @@ func (c *StorageMinerStruct) StorageFindSector(ctx context.Context, si abi.Secto
return c.Internal.StorageFindSector(ctx, si, types)
}
func (c *StorageMinerStruct) StorageList(ctx context.Context) (map[stores.ID][]stores.Decl, error) {
return c.Internal.StorageList(ctx)
}
func (c *StorageMinerStruct) StorageInfo(ctx context.Context, id stores.ID) (stores.StorageInfo, error) {
return c.Internal.StorageInfo(ctx, id)
}
func (c *StorageMinerStruct) MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error {
return c.Internal.MarketImportDealData(ctx, propcid, path)
}