-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathclient_gen.go
299 lines (282 loc) · 16 KB
/
client_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
// Generated by gen.go. Do not edit.
package core
import (
"context"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/venus/venus-shared/actors/builtin"
"github.com/filecoin-project/venus/venus-shared/types"
"github.com/ipfs-force-community/damocles/damocles-manager/modules"
"github.com/ipfs-force-community/damocles/damocles-manager/pkg/extproc/stage"
"github.com/ipfs/go-cid"
)
// SealerAPIClient is generated client for SealerAPI interface.
type SealerAPIClient struct {
AllocateSector func(context.Context, AllocateSectorSpec) (*AllocatedSector, error)
AcquireDeals func(context.Context, abi.SectorID, AcquireDealsSpec) (Deals, error)
AssignTicket func(context.Context, abi.SectorID) (Ticket, error)
SubmitPreCommit func(context.Context, AllocatedSector, PreCommitOnChainInfo, bool) (SubmitPreCommitResp, error)
PollPreCommitState func(context.Context, abi.SectorID) (PollPreCommitStateResp, error)
SubmitPersisted func(context.Context, abi.SectorID, string) (bool, error)
SubmitPersistedEx func(ctx context.Context, sid abi.SectorID, instanceName string, isUpgrade bool) (bool, error)
WaitSeed func(context.Context, abi.SectorID) (WaitSeedResp, error)
SubmitProof func(context.Context, abi.SectorID, ProofOnChainInfo, bool) (SubmitProofResp, error)
PollProofState func(context.Context, abi.SectorID) (PollProofStateResp, error)
ReportState func(context.Context, abi.SectorID, ReportStateReq) (*SectorStateResp, error)
ReportFinalized func(context.Context, abi.SectorID) (Meta, error)
ReportAborted func(context.Context, abi.SectorID, string) (Meta, error)
AllocateSanpUpSector func(ctx context.Context, spec AllocateSnapUpSpec) (*AllocatedSnapUpSector, error)
SubmitSnapUpProof func(ctx context.Context, sid abi.SectorID, snapupInfo SnapUpOnChainInfo) (SubmitSnapUpProofResp, error)
AllocateRebuildSector func(ctx context.Context, spec AllocateSectorSpec) (*SectorRebuildInfo, error)
WorkerPing func(ctx context.Context, winfo WorkerInfo) (Meta, error)
StoreReserveSpace func(ctx context.Context, sid abi.SectorID, size uint64, candidates []string) (*StoreBasicInfo, error)
StoreBasicInfo func(ctx context.Context, instanceName string) (*StoreBasicInfo, error)
AllocateUnsealSector func(ctx context.Context, spec AllocateSectorSpec) (*SectorUnsealInfo, error)
AchieveUnsealSector func(ctx context.Context, sid abi.SectorID, pieceCid cid.Cid, errInfo string) (Meta, error)
AcquireUnsealDest func(ctx context.Context, sid abi.SectorID, pieceCid cid.Cid) ([]string, error)
StoreUri func(ctx context.Context, storeName, resource []string) (map[string]string, error)
}
var UnavailableSealerAPIClient = SealerAPIClient{
AllocateSector: func(context.Context, AllocateSectorSpec) (*AllocatedSector, error) {
panic("SealerAPI client unavailable")
},
AcquireDeals: func(context.Context, abi.SectorID, AcquireDealsSpec) (Deals, error) {
panic("SealerAPI client unavailable")
},
AssignTicket: func(context.Context, abi.SectorID) (Ticket, error) {
panic("SealerAPI client unavailable")
},
SubmitPreCommit: func(context.Context, AllocatedSector, PreCommitOnChainInfo, bool) (SubmitPreCommitResp, error) {
panic("SealerAPI client unavailable")
},
PollPreCommitState: func(context.Context, abi.SectorID) (PollPreCommitStateResp, error) {
panic("SealerAPI client unavailable")
},
SubmitPersisted: func(context.Context, abi.SectorID, string) (bool, error) {
panic("SealerAPI client unavailable")
},
SubmitPersistedEx: func(ctx context.Context, sid abi.SectorID, instanceName string, isUpgrade bool) (bool, error) {
panic("SealerAPI client unavailable")
},
WaitSeed: func(context.Context, abi.SectorID) (WaitSeedResp, error) {
panic("SealerAPI client unavailable")
},
SubmitProof: func(context.Context, abi.SectorID, ProofOnChainInfo, bool) (SubmitProofResp, error) {
panic("SealerAPI client unavailable")
},
PollProofState: func(context.Context, abi.SectorID) (PollProofStateResp, error) {
panic("SealerAPI client unavailable")
},
ReportState: func(context.Context, abi.SectorID, ReportStateReq) (*SectorStateResp, error) {
panic("SealerAPI client unavailable")
},
ReportFinalized: func(context.Context, abi.SectorID) (Meta, error) {
panic("SealerAPI client unavailable")
},
ReportAborted: func(context.Context, abi.SectorID, string) (Meta, error) {
panic("SealerAPI client unavailable")
},
AllocateSanpUpSector: func(ctx context.Context, spec AllocateSnapUpSpec) (*AllocatedSnapUpSector, error) {
panic("SealerAPI client unavailable")
},
SubmitSnapUpProof: func(ctx context.Context, sid abi.SectorID, snapupInfo SnapUpOnChainInfo) (SubmitSnapUpProofResp, error) {
panic("SealerAPI client unavailable")
},
AllocateRebuildSector: func(ctx context.Context, spec AllocateSectorSpec) (*SectorRebuildInfo, error) {
panic("SealerAPI client unavailable")
},
WorkerPing: func(ctx context.Context, winfo WorkerInfo) (Meta, error) {
panic("SealerAPI client unavailable")
},
StoreReserveSpace: func(ctx context.Context, sid abi.SectorID, size uint64, candidates []string) (*StoreBasicInfo, error) {
panic("SealerAPI client unavailable")
},
StoreBasicInfo: func(ctx context.Context, instanceName string) (*StoreBasicInfo, error) {
panic("SealerAPI client unavailable")
},
AllocateUnsealSector: func(ctx context.Context, spec AllocateSectorSpec) (*SectorUnsealInfo, error) {
panic("SealerAPI client unavailable")
},
AchieveUnsealSector: func(ctx context.Context, sid abi.SectorID, pieceCid cid.Cid, errInfo string) (Meta, error) {
panic("SealerAPI client unavailable")
},
AcquireUnsealDest: func(ctx context.Context, sid abi.SectorID, pieceCid cid.Cid) ([]string, error) {
panic("SealerAPI client unavailable")
},
StoreUri: func(ctx context.Context, storeName, resource []string) (map[string]string, error) {
panic("SealerAPI client unavailable")
},
}
// SealerCliAPIClient is generated client for SealerCliAPI interface.
type SealerCliAPIClient struct {
ListSectors func(context.Context, SectorWorkerState, SectorWorkerJob) ([]*SectorState, error)
FindSector func(ctx context.Context, state SectorWorkerState, sid abi.SectorID) (*SectorState, error)
FindSectorInAllStates func(ctx context.Context, sid abi.SectorID) (*SectorState, error)
FindSectorsWithDeal func(ctx context.Context, state SectorWorkerState, dealID abi.DealID) ([]*SectorState, error)
FindSectorWithPiece func(ctx context.Context, state SectorWorkerState, pieceCid cid.Cid) (*SectorState, error)
ImportSector func(ctx context.Context, ws SectorWorkerState, state *SectorState, override bool) (bool, error)
RestoreSector func(ctx context.Context, sid abi.SectorID, forced bool) (Meta, error)
CheckProvable func(ctx context.Context, mid abi.ActorID, postProofType abi.RegisteredPoStProof, sectors []builtin.ExtendedSectorInfo, strict, stateCheck bool) (map[abi.SectorNumber]string, error)
SimulateWdPoSt func(ctx context.Context, ddlIndex, partitionIndex uint64, maddr address.Address, postProofType abi.RegisteredPoStProof, sis []builtin.ExtendedSectorInfo, rand abi.PoStRandomness) error
SnapUpPreFetch func(ctx context.Context, mid abi.ActorID, dlindex *uint64) (*SnapUpFetchResult, error)
SnapUpCandidates func(ctx context.Context, mid abi.ActorID) ([]*bitfield.BitField, error)
SnapUpCancelCommitment func(ctx context.Context, sid abi.SectorID) error
ProvingSectorInfo func(ctx context.Context, sid abi.SectorID) (ProvingSectorInfo, error)
WorkerGetPingInfo func(ctx context.Context, name string) (*WorkerPingInfo, error)
WorkerPingInfoList func(ctx context.Context) ([]WorkerPingInfo, error)
WorkerPingInfoRemove func(ctx context.Context, name string) error
SectorIndexerFind func(ctx context.Context, indexType SectorIndexType, sid abi.SectorID) (SectorIndexLocation, error)
TerminateSector func(context.Context, abi.SectorID) (SubmitTerminateResp, error)
PollTerminateSectorState func(context.Context, abi.SectorID) (TerminateInfo, error)
RemoveSector func(context.Context, abi.SectorID) error
FinalizeSector func(context.Context, abi.SectorID) error
StoreReleaseReserved func(ctx context.Context, sid abi.SectorID) (bool, error)
StoreList func(ctx context.Context) ([]StoreDetailedInfo, error)
SectorSetForRebuild func(ctx context.Context, sid abi.SectorID, opt RebuildOptions) (bool, error)
UnsealPiece func(ctx context.Context, sid abi.SectorID, pieceCid cid.Cid, offset types.UnpaddedByteIndex, size abi.UnpaddedPieceSize, dest string) (<-chan []byte, error)
Version func(ctx context.Context) (string, error)
}
var UnavailableSealerCliAPIClient = SealerCliAPIClient{
ListSectors: func(context.Context, SectorWorkerState, SectorWorkerJob) ([]*SectorState, error) {
panic("SealerCliAPI client unavailable")
},
FindSector: func(ctx context.Context, state SectorWorkerState, sid abi.SectorID) (*SectorState, error) {
panic("SealerCliAPI client unavailable")
},
FindSectorInAllStates: func(ctx context.Context, sid abi.SectorID) (*SectorState, error) {
panic("SealerCliAPI client unavailable")
},
FindSectorsWithDeal: func(ctx context.Context, state SectorWorkerState, dealID abi.DealID) ([]*SectorState, error) {
panic("SealerCliAPI client unavailable")
},
FindSectorWithPiece: func(ctx context.Context, state SectorWorkerState, pieceCid cid.Cid) (*SectorState, error) {
panic("SealerCliAPI client unavailable")
},
ImportSector: func(ctx context.Context, ws SectorWorkerState, state *SectorState, override bool) (bool, error) {
panic("SealerCliAPI client unavailable")
},
RestoreSector: func(ctx context.Context, sid abi.SectorID, forced bool) (Meta, error) {
panic("SealerCliAPI client unavailable")
},
CheckProvable: func(ctx context.Context, mid abi.ActorID, postProofType abi.RegisteredPoStProof, sectors []builtin.ExtendedSectorInfo, strict, stateCheck bool) (map[abi.SectorNumber]string, error) {
panic("SealerCliAPI client unavailable")
},
SimulateWdPoSt: func(ctx context.Context, ddlIndex, partitionIndex uint64, maddr address.Address, postProofType abi.RegisteredPoStProof, sis []builtin.ExtendedSectorInfo, rand abi.PoStRandomness) error {
panic("SealerCliAPI client unavailable")
},
SnapUpPreFetch: func(ctx context.Context, mid abi.ActorID, dlindex *uint64) (*SnapUpFetchResult, error) {
panic("SealerCliAPI client unavailable")
},
SnapUpCandidates: func(ctx context.Context, mid abi.ActorID) ([]*bitfield.BitField, error) {
panic("SealerCliAPI client unavailable")
},
SnapUpCancelCommitment: func(ctx context.Context, sid abi.SectorID) error {
panic("SealerCliAPI client unavailable")
},
ProvingSectorInfo: func(ctx context.Context, sid abi.SectorID) (ProvingSectorInfo, error) {
panic("SealerCliAPI client unavailable")
},
WorkerGetPingInfo: func(ctx context.Context, name string) (*WorkerPingInfo, error) {
panic("SealerCliAPI client unavailable")
},
WorkerPingInfoList: func(ctx context.Context) ([]WorkerPingInfo, error) {
panic("SealerCliAPI client unavailable")
},
WorkerPingInfoRemove: func(ctx context.Context, name string) error {
panic("SealerCliAPI client unavailable")
},
SectorIndexerFind: func(ctx context.Context, indexType SectorIndexType, sid abi.SectorID) (SectorIndexLocation, error) {
panic("SealerCliAPI client unavailable")
},
TerminateSector: func(context.Context, abi.SectorID) (SubmitTerminateResp, error) {
panic("SealerCliAPI client unavailable")
},
PollTerminateSectorState: func(context.Context, abi.SectorID) (TerminateInfo, error) {
panic("SealerCliAPI client unavailable")
},
RemoveSector: func(context.Context, abi.SectorID) error {
panic("SealerCliAPI client unavailable")
},
FinalizeSector: func(context.Context, abi.SectorID) error {
panic("SealerCliAPI client unavailable")
},
StoreReleaseReserved: func(ctx context.Context, sid abi.SectorID) (bool, error) {
panic("SealerCliAPI client unavailable")
},
StoreList: func(ctx context.Context) ([]StoreDetailedInfo, error) {
panic("SealerCliAPI client unavailable")
},
SectorSetForRebuild: func(ctx context.Context, sid abi.SectorID, opt RebuildOptions) (bool, error) {
panic("SealerCliAPI client unavailable")
},
UnsealPiece: func(ctx context.Context, sid abi.SectorID, pieceCid cid.Cid, offset types.UnpaddedByteIndex, size abi.UnpaddedPieceSize, dest string) (<-chan []byte, error) {
panic("SealerCliAPI client unavailable")
},
Version: func(ctx context.Context) (string, error) {
panic("SealerCliAPI client unavailable")
},
}
// RandomnessAPIClient is generated client for RandomnessAPI interface.
type RandomnessAPIClient struct {
GetTicket func(context.Context, types.TipSetKey, abi.ChainEpoch, abi.ActorID) (Ticket, error)
GetSeed func(context.Context, types.TipSetKey, abi.ChainEpoch, abi.ActorID) (Seed, error)
GetWindowPoStChanlleengeRand func(context.Context, types.TipSetKey, abi.ChainEpoch, abi.ActorID) (WindowPoStRandomness, error)
GetWindowPoStCommitRand func(context.Context, types.TipSetKey, abi.ChainEpoch) (WindowPoStRandomness, error)
}
var UnavailableRandomnessAPIClient = RandomnessAPIClient{
GetTicket: func(context.Context, types.TipSetKey, abi.ChainEpoch, abi.ActorID) (Ticket, error) {
panic("RandomnessAPI client unavailable")
},
GetSeed: func(context.Context, types.TipSetKey, abi.ChainEpoch, abi.ActorID) (Seed, error) {
panic("RandomnessAPI client unavailable")
},
GetWindowPoStChanlleengeRand: func(context.Context, types.TipSetKey, abi.ChainEpoch, abi.ActorID) (WindowPoStRandomness, error) {
panic("RandomnessAPI client unavailable")
},
GetWindowPoStCommitRand: func(context.Context, types.TipSetKey, abi.ChainEpoch) (WindowPoStRandomness, error) {
panic("RandomnessAPI client unavailable")
},
}
// MinerAPIClient is generated client for MinerAPI interface.
type MinerAPIClient struct {
GetInfo func(context.Context, abi.ActorID) (*MinerInfo, error)
GetMinerConfig func(context.Context, abi.ActorID) (*modules.MinerConfig, error)
}
var UnavailableMinerAPIClient = MinerAPIClient{
GetInfo: func(context.Context, abi.ActorID) (*MinerInfo, error) {
panic("MinerAPI client unavailable")
},
GetMinerConfig: func(context.Context, abi.ActorID) (*modules.MinerConfig, error) {
panic("MinerAPI client unavailable")
},
}
// WorkerWdPoStAPIClient is generated client for WorkerWdPoStAPI interface.
type WorkerWdPoStAPIClient struct {
WdPoStHeartbeatJobs func(ctx context.Context, runningJobIDs []string, workerName string) (Meta, error)
WdPoStAllocateJobs func(ctx context.Context, spec AllocateWdPoStJobSpec, num uint32, workerName string) (allocatedJobs []*WdPoStAllocatedJob, err error)
WdPoStFinishJob func(ctx context.Context, jobID string, output *stage.WindowPoStOutput, errorReason string) (Meta, error)
WdPoStResetJob func(ctx context.Context, jobID string) (Meta, error)
WdPoStRemoveJob func(ctx context.Context, jobID string) (Meta, error)
WdPoStAllJobs func(ctx context.Context) (AllWdPoStJob, error)
}
var UnavailableWorkerWdPoStAPIClient = WorkerWdPoStAPIClient{
WdPoStHeartbeatJobs: func(ctx context.Context, runningJobIDs []string, workerName string) (Meta, error) {
panic("WorkerWdPoStAPI client unavailable")
},
WdPoStAllocateJobs: func(ctx context.Context, spec AllocateWdPoStJobSpec, num uint32, workerName string) (allocatedJobs []*WdPoStAllocatedJob, err error) {
panic("WorkerWdPoStAPI client unavailable")
},
WdPoStFinishJob: func(ctx context.Context, jobID string, output *stage.WindowPoStOutput, errorReason string) (Meta, error) {
panic("WorkerWdPoStAPI client unavailable")
},
WdPoStResetJob: func(ctx context.Context, jobID string) (Meta, error) {
panic("WorkerWdPoStAPI client unavailable")
},
WdPoStRemoveJob: func(ctx context.Context, jobID string) (Meta, error) {
panic("WorkerWdPoStAPI client unavailable")
},
WdPoStAllJobs: func(ctx context.Context) (AllWdPoStJob, error) {
panic("WorkerWdPoStAPI client unavailable")
},
}