-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
540 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
pkg/taucorder/clients/js/gen/taucorder/v1/health_connect.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" | ||
// @generated from file taucorder/v1/health.proto (package taucorder.v1, syntax proto3) | ||
/* eslint-disable */ | ||
// @ts-nocheck | ||
|
||
import { Empty } from "./common_pb.js"; | ||
import { MethodKind } from "@bufbuild/protobuf"; | ||
|
||
/** | ||
* Service | ||
* | ||
* @generated from service taucorder.v1.HealthService | ||
*/ | ||
export const HealthService = { | ||
typeName: "taucorder.v1.HealthService", | ||
methods: { | ||
/** | ||
* @generated from rpc taucorder.v1.HealthService.Ping | ||
*/ | ||
ping: { | ||
name: "Ping", | ||
I: Empty, | ||
O: Empty, | ||
kind: MethodKind.Unary, | ||
}, | ||
} | ||
} as const; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Transport } from "@connectrpc/connect"; | ||
import { RPCClient } from "./HealthClient"; | ||
import { Empty, Node } from "../gen/taucorder/v1/common_pb"; | ||
|
||
export class Health { | ||
private client: RPCClient; | ||
|
||
constructor(transport: Transport) { | ||
this.client = new RPCClient(transport); | ||
} | ||
|
||
/** | ||
* Ping the health service | ||
* @returns Empty response | ||
*/ | ||
async ping() { | ||
await this.client.ping(new Empty()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { PromiseClient, createPromiseClient, Transport } from "@connectrpc/connect"; | ||
import { HealthService } from "../gen/taucorder/v1/health_connect"; | ||
import { Empty } from "../gen/taucorder/v1/common_pb"; | ||
|
||
export class RPCClient { | ||
private client: PromiseClient<typeof HealthService>; | ||
|
||
constructor(transport: Transport) { | ||
this.client = createPromiseClient(HealthService, transport); | ||
} | ||
|
||
async ping(req: Empty): Promise<Empty> { | ||
return this.client.ping(req); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
112 changes: 112 additions & 0 deletions
112
pkg/taucorder/proto/gen/taucorder/v1/taucorderv1connect/health.connect.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
syntax = "proto3"; | ||
|
||
package taucorder.v1; | ||
|
||
option go_package = "."; | ||
|
||
import "taucorder/v1/common.proto"; | ||
|
||
// Data Structures | ||
|
||
// Service | ||
service HealthService { | ||
rpc Ping(Empty) returns (Empty); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package service | ||
|
||
import ( | ||
"context" | ||
|
||
"connectrpc.com/connect" | ||
pb "github.com/taubyte/tau/pkg/taucorder/proto/gen/taucorder/v1" | ||
) | ||
|
||
func (ts *healthService) Ping(ctx context.Context, req *connect.Request[pb.Empty]) (*connect.Response[pb.Empty], error) { | ||
return connect.NewResponse(&pb.Empty{}), nil | ||
} |
Oops, something went wrong.