docsgen, lint

This commit is contained in:
Łukasz Magiera 2020-12-10 19:36:02 +01:00
parent d347e7ab8f
commit 564b88af52
3 changed files with 36 additions and 1 deletions

View File

@ -237,6 +237,9 @@ func init() {
addExample(map[abi.SectorNumber]string{
123: "can't acquire read lock",
})
addExample(map[api.SectorState]int{
api.SectorState(sealing.Proving): 120,
})
// worker specific
addExample(storiface.AcquireMove)

View File

@ -97,8 +97,10 @@
* [SectorStartSealing](#SectorStartSealing)
* [Sectors](#Sectors)
* [SectorsList](#SectorsList)
* [SectorsListInStates](#SectorsListInStates)
* [SectorsRefs](#SectorsRefs)
* [SectorsStatus](#SectorsStatus)
* [SectorsSummary](#SectorsSummary)
* [SectorsUpdate](#SectorsUpdate)
* [Storage](#Storage)
* [StorageAddLocal](#StorageAddLocal)
@ -1496,6 +1498,21 @@ Inputs: `null`
Response: `null`
### SectorsListInStates
List sectors in particular states
Perms: read
Inputs:
```json
[
null
]
```
Response: `null`
### SectorsRefs
There are not yet any comments for this method.
@ -1564,6 +1581,21 @@ Response:
}
```
### SectorsSummary
Get summary info of sectors
Perms: read
Inputs: `null`
Response:
```json
{
"Proving": 120
}
```
### SectorsUpdate
There are not yet any comments for this method.

View File

@ -255,7 +255,7 @@ func (sm *StorageMinerAPI) SectorsSummary(ctx context.Context) (map[api.SectorSt
out := make(map[api.SectorState]int)
for i := range sectors {
state := api.SectorState(sectors[i].State)
out[state] += 1
out[state]++
}
return out, nil