Skip to content

Commit 166d808

Browse files
add hourglass performer api (#49)
2 parents 48800e0 + dddffa4 commit 166d808

File tree

20 files changed

+8985
-2237
lines changed

20 files changed

+8985
-2237
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ deps/local-plugin:
1919

2020
.PHONY: deps/dev
2121
deps/dev: deps/system deps/local-plugin
22-
${GO} get google.golang.org/protobuf/cmd/protoc-gen-go
23-
${GO} get google.golang.org/grpc/cmd/protoc-gen-go-grpc
22+
${GO} get google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
23+
${GO} get google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
2424
${GO} get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
2525
${GO} get github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts
2626
${GO} get github.com/akuity/grpc-gateway-client/protoc-gen-grpc-gateway-client@latest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
```bash
77
# Install the dependencies
8-
make deps
8+
make deps/dev
99

1010
# Compile the proto files
1111
make proto

buf-plugin-openapi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BUILD_DIR=./bin
1010
GO_BUILD_FLAGS=-v
1111

1212
# Installation directory (this should be in your PATH)
13-
INSTALL_DIR=$(HOME)/.gvm/pkgsets/go1.23.6/global/bin
13+
INSTALL_DIR=$(GOPATH)/bin
1414

1515
# Ensure build directory exists
1616
$(BUILD_DIR):

buf.gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugins:
1919
out: gen/protos
2020
opt:
2121
- paths=source_relative
22-
- local: buf-plugin-openapi
22+
- local: protoc-gen-buf-plugin-openapi
2323
out: gen/openapi
2424
strategy: all
2525
opt:
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* eslint-disable */
2+
// @ts-nocheck
3+
/*
4+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5+
*/
6+
7+
import * as fm from "../../../../fetch.pb"
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 = {
22+
payload?: Uint8Array
23+
}
24+
25+
export type StartSyncResponse = {
26+
}
27+
28+
export type TaskRequest = {
29+
taskId?: Uint8Array
30+
payload?: Uint8Array
31+
}
32+
33+
export type TaskResponse = {
34+
taskId?: Uint8Array
35+
result?: Uint8Array
36+
}
37+
38+
export class PerformerService {
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)})
44+
}
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)})
47+
}
48+
}

0 commit comments

Comments
 (0)