Skip to content

Commit f74546f

Browse files
committed
update proto
1 parent b847e09 commit f74546f

File tree

7 files changed

+475
-252
lines changed

7 files changed

+475
-252
lines changed

gen/api-ts/eigenlayer/hourglass/v1/performer/performer.pb.ts

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,44 @@
55
*/
66

77
import * as fm from "../../../../fetch.pb"
8-
export type Task = {
9-
taskId?: string
10-
metadata?: Uint8Array
8+
9+
export enum PerformerStatus {
10+
READY_FOR_SYNC = "READY_FOR_SYNC",
11+
READY_FOR_TASK = "READY_FOR_TASK",
12+
}
13+
14+
export type HealthCheckRequest = {
15+
}
16+
17+
export type HealthCheckResponse = {
18+
status?: PerformerStatus
19+
}
20+
21+
export type StartSyncRequest = {
1122
payload?: Uint8Array
1223
}
1324

14-
export type TaskResult = {
15-
taskId?: string
16-
result?: Uint8Array
25+
export type StartSyncResponse = {
1726
}
1827

19-
export type HealthRequest = {
28+
export type TaskRequest = {
29+
taskId?: Uint8Array
30+
payload?: Uint8Array
2031
}
2132

22-
export type HealthResponse = {
23-
status?: string
33+
export type TaskResponse = {
34+
taskId?: Uint8Array
35+
result?: Uint8Array
2436
}
2537

2638
export class PerformerService {
27-
static ExecuteTask(req: Task, initReq?: fm.InitReq): Promise<TaskResult> {
28-
return fm.fetchReq<Task, TaskResult>(`/eigenlayer.hourglass.v1.performer.PerformerService/ExecuteTask`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
39+
static HealthCheck(req: HealthCheckRequest, initReq?: fm.InitReq): Promise<HealthCheckResponse> {
40+
return fm.fetchReq<HealthCheckRequest, HealthCheckResponse>(`/eigenlayer.hourglass.v1.performer.PerformerService/HealthCheck`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
41+
}
42+
static StartSync(req: StartSyncRequest, initReq?: fm.InitReq): Promise<StartSyncResponse> {
43+
return fm.fetchReq<StartSyncRequest, StartSyncResponse>(`/eigenlayer.hourglass.v1.performer.PerformerService/StartSync`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
2944
}
30-
static Health(req: HealthRequest, initReq?: fm.InitReq): Promise<HealthResponse> {
31-
return fm.fetchReq<HealthRequest, HealthResponse>(`/eigenlayer.hourglass.v1.performer.PerformerService/Health`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
45+
static ExecuteTask(req: TaskRequest, initReq?: fm.InitReq): Promise<TaskResponse> {
46+
return fm.fetchReq<TaskRequest, TaskResponse>(`/eigenlayer.hourglass.v1.performer.PerformerService/ExecuteTask`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
3247
}
3348
}

gen/openapi/api.public.swagger.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,25 +1846,9 @@
18461846
}
18471847
},
18481848
"HealthCheckRequest": {
1849-
"type": "object",
1850-
"properties": {
1851-
"service": {
1852-
"type": "string"
1853-
}
1854-
}
1855-
},
1856-
"HealthCheckResponse": {
1857-
"type": "object",
1858-
"properties": {
1859-
"status": {
1860-
"type": "string"
1861-
}
1862-
}
1863-
},
1864-
"HealthRequest": {
18651849
"type": "object"
18661850
},
1867-
"HealthResponse": {
1851+
"HealthCheckResponse": {
18681852
"type": "object",
18691853
"properties": {
18701854
"status": {
@@ -2381,6 +2365,13 @@
23812365
}
23822366
}
23832367
},
2368+
"PerformerStatus": {
2369+
"type": "string",
2370+
"enum": [
2371+
"READY_FOR_SYNC",
2372+
"READY_FOR_TASK"
2373+
]
2374+
},
23842375
"Proof": {
23852376
"type": "object",
23862377
"properties": {
@@ -2761,6 +2752,18 @@
27612752
}
27622753
}
27632754
},
2755+
"StartSyncRequest": {
2756+
"type": "object",
2757+
"properties": {
2758+
"payload": {
2759+
"type": "string",
2760+
"format": "byte"
2761+
}
2762+
}
2763+
},
2764+
"StartSyncResponse": {
2765+
"type": "object"
2766+
},
27642767
"StateRoot": {
27652768
"type": "object",
27662769
"properties": {
@@ -2927,31 +2930,29 @@
29272930
}
29282931
}
29292932
},
2930-
"Task": {
2933+
"TaskRequest": {
29312934
"type": "object",
29322935
"properties": {
2933-
"metadata": {
2934-
"type": "string",
2935-
"format": "byte"
2936-
},
29372936
"payload": {
29382937
"type": "string",
29392938
"format": "byte"
29402939
},
29412940
"taskId": {
2942-
"type": "string"
2941+
"type": "string",
2942+
"format": "byte"
29432943
}
29442944
}
29452945
},
2946-
"TaskResult": {
2946+
"TaskResponse": {
29472947
"type": "object",
29482948
"properties": {
29492949
"result": {
29502950
"type": "string",
29512951
"format": "byte"
29522952
},
29532953
"taskId": {
2954-
"type": "string"
2954+
"type": "string",
2955+
"format": "byte"
29552956
}
29562957
}
29572958
},

gen/openapi/api.swagger.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,25 +2929,9 @@
29292929
}
29302930
},
29312931
"HealthCheckRequest": {
2932-
"type": "object",
2933-
"properties": {
2934-
"service": {
2935-
"type": "string"
2936-
}
2937-
}
2938-
},
2939-
"HealthCheckResponse": {
2940-
"type": "object",
2941-
"properties": {
2942-
"status": {
2943-
"type": "string"
2944-
}
2945-
}
2946-
},
2947-
"HealthRequest": {
29482932
"type": "object"
29492933
},
2950-
"HealthResponse": {
2934+
"HealthCheckResponse": {
29512935
"type": "object",
29522936
"properties": {
29532937
"status": {
@@ -3464,6 +3448,13 @@
34643448
}
34653449
}
34663450
},
3451+
"PerformerStatus": {
3452+
"type": "string",
3453+
"enum": [
3454+
"READY_FOR_SYNC",
3455+
"READY_FOR_TASK"
3456+
]
3457+
},
34673458
"Proof": {
34683459
"type": "object",
34693460
"properties": {
@@ -3844,6 +3835,18 @@
38443835
}
38453836
}
38463837
},
3838+
"StartSyncRequest": {
3839+
"type": "object",
3840+
"properties": {
3841+
"payload": {
3842+
"type": "string",
3843+
"format": "byte"
3844+
}
3845+
}
3846+
},
3847+
"StartSyncResponse": {
3848+
"type": "object"
3849+
},
38473850
"StateRoot": {
38483851
"type": "object",
38493852
"properties": {
@@ -4010,31 +4013,29 @@
40104013
}
40114014
}
40124015
},
4013-
"Task": {
4016+
"TaskRequest": {
40144017
"type": "object",
40154018
"properties": {
4016-
"metadata": {
4017-
"type": "string",
4018-
"format": "byte"
4019-
},
40204019
"payload": {
40214020
"type": "string",
40224021
"format": "byte"
40234022
},
40244023
"taskId": {
4025-
"type": "string"
4024+
"type": "string",
4025+
"format": "byte"
40264026
}
40274027
}
40284028
},
4029-
"TaskResult": {
4029+
"TaskResponse": {
40304030
"type": "object",
40314031
"properties": {
40324032
"result": {
40334033
"type": "string",
40344034
"format": "byte"
40354035
},
40364036
"taskId": {
4037-
"type": "string"
4037+
"type": "string",
4038+
"format": "byte"
40384039
}
40394040
}
40404041
},

gen/openapiv2/apidocs.swagger.json

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@
15761576
"200": {
15771577
"description": "A successful response.",
15781578
"schema": {
1579-
"$ref": "#/definitions/healthHealthCheckResponse"
1579+
"$ref": "#/definitions/v1healthHealthCheckResponse"
15801580
}
15811581
},
15821582
"default": {
@@ -2284,14 +2284,6 @@
22842284
}
22852285
}
22862286
},
2287-
"healthHealthCheckResponse": {
2288-
"type": "object",
2289-
"properties": {
2290-
"status": {
2291-
"$ref": "#/definitions/HealthCheckResponseServingStatus"
2292-
}
2293-
}
2294-
},
22952287
"healthReadyResponse": {
22962288
"type": "object",
22972289
"properties": {
@@ -2351,19 +2343,23 @@
23512343
}
23522344
}
23532345
},
2354-
"performerHealthResponse": {
2355-
"type": "object",
2356-
"properties": {
2357-
"status": {
2358-
"type": "string"
2359-
}
2360-
}
2346+
"performerPerformerStatus": {
2347+
"type": "string",
2348+
"enum": [
2349+
"READY_FOR_SYNC",
2350+
"READY_FOR_TASK"
2351+
],
2352+
"default": "READY_FOR_SYNC"
2353+
},
2354+
"performerStartSyncResponse": {
2355+
"type": "object"
23612356
},
2362-
"performerTaskResult": {
2357+
"performerTaskResponse": {
23632358
"type": "object",
23642359
"properties": {
23652360
"taskId": {
2366-
"type": "string"
2361+
"type": "string",
2362+
"format": "byte"
23672363
},
23682364
"result": {
23692365
"type": "string",
@@ -3510,6 +3506,14 @@
35103506
}
35113507
}
35123508
},
3509+
"v1healthHealthCheckResponse": {
3510+
"type": "object",
3511+
"properties": {
3512+
"status": {
3513+
"$ref": "#/definitions/HealthCheckResponseServingStatus"
3514+
}
3515+
}
3516+
},
35133517
"v1operatorSetsOperatorSet": {
35143518
"type": "object",
35153519
"properties": {
@@ -3531,6 +3535,14 @@
35313535
}
35323536
}
35333537
},
3538+
"v1performerHealthCheckResponse": {
3539+
"type": "object",
3540+
"properties": {
3541+
"status": {
3542+
"$ref": "#/definitions/performerPerformerStatus"
3543+
}
3544+
}
3545+
},
35343546
"v1protocolStrategy": {
35353547
"type": "object",
35363548
"properties": {

0 commit comments

Comments
 (0)