2023-02-26 14:51:34 +03:00
|
|
|
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
2023-08-16 10:18:38 +03:00
|
|
|
// protoc-gen-go-micro version: v4.0.2
|
2023-05-04 02:20:25 +03:00
|
|
|
// source: health/health.proto
|
2023-02-26 14:51:34 +03:00
|
|
|
|
|
|
|
package health
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "context"
|
2023-04-28 21:59:31 +03:00
|
|
|
codec "go.unistack.org/micro-proto/v4/codec"
|
|
|
|
v4 "go.unistack.org/micro-server-http/v4"
|
2023-08-16 10:18:38 +03:00
|
|
|
options "go.unistack.org/micro/v4/options"
|
2023-04-28 21:59:31 +03:00
|
|
|
server "go.unistack.org/micro/v4/server"
|
2023-02-26 14:51:34 +03:00
|
|
|
)
|
|
|
|
|
2023-08-16 10:18:38 +03:00
|
|
|
var (
|
|
|
|
HealthServiceServerEndpoints = []v4.EndpointMetadata{
|
|
|
|
{
|
|
|
|
Name: "HealthService.Live",
|
|
|
|
Path: "/live",
|
|
|
|
Method: "GET",
|
|
|
|
Body: "",
|
|
|
|
Stream: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "HealthService.Ready",
|
|
|
|
Path: "/ready",
|
|
|
|
Method: "GET",
|
|
|
|
Body: "",
|
|
|
|
Stream: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "HealthService.Version",
|
|
|
|
Path: "/version",
|
|
|
|
Method: "GET",
|
|
|
|
Body: "",
|
|
|
|
Stream: false,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2023-02-26 14:51:34 +03:00
|
|
|
type healthServiceServer struct {
|
|
|
|
HealthServiceServer
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *healthServiceServer) Live(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error {
|
|
|
|
return h.HealthServiceServer.Live(ctx, req, rsp)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *healthServiceServer) Ready(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error {
|
|
|
|
return h.HealthServiceServer.Ready(ctx, req, rsp)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *healthServiceServer) Version(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error {
|
|
|
|
return h.HealthServiceServer.Version(ctx, req, rsp)
|
|
|
|
}
|
|
|
|
|
2023-08-16 10:18:38 +03:00
|
|
|
func RegisterHealthServiceServer(s server.Server, sh HealthServiceServer, opts ...options.Option) error {
|
2023-02-26 14:51:34 +03:00
|
|
|
type healthService interface {
|
|
|
|
Live(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
|
|
|
|
Ready(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
|
|
|
|
Version(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
|
|
|
|
}
|
|
|
|
type HealthService struct {
|
|
|
|
healthService
|
|
|
|
}
|
|
|
|
h := &healthServiceServer{sh}
|
2023-08-16 10:18:38 +03:00
|
|
|
var nopts []options.Option
|
2023-04-28 21:59:31 +03:00
|
|
|
nopts = append(nopts, v4.HandlerEndpoints(HealthServiceServerEndpoints))
|
2023-08-16 10:18:38 +03:00
|
|
|
return s.Handle(&HealthService{h}, append(nopts, opts...)...)
|
2023-02-26 14:51:34 +03:00
|
|
|
}
|