fix and regen

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-02-22 00:09:52 +03:00
parent 34387f129d
commit 742b99636a
4 changed files with 38 additions and 22 deletions

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT. // Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-micro v3.5.3 // - protoc-gen-go-micro v3.10.2
// - protoc v3.21.12 // - protoc v3.21.12
// source: handler.proto // source: handler.proto
@ -8,18 +8,21 @@ package handler
import ( import (
context "context" context "context"
v3 "go.unistack.org/micro-server-http/v3"
codec "go.unistack.org/micro/v3/codec" codec "go.unistack.org/micro/v3/codec"
http "net/http"
) )
var ( var (
MeterServiceName = "MeterService" MeterServiceName = "MeterService"
) )
var ( var (
MeterServiceServerEndpoints = map[string]map[string]string{ MeterServiceServerEndpoints = []v3.EndpointMetadata{
"/metrics": map[string]string{ {
"Method": http.MethodGet, Name: "MeterService.Metrics",
"Stream": "false", Path: "/metrics",
Method: "GET",
Body: "",
Stream: false,
}, },
} }
) )

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT. // Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3 // protoc-gen-go-micro version: v3.10.2
// source: handler.proto // source: handler.proto
package handler package handler
@ -21,12 +21,13 @@ func (h *meterServiceServer) Metrics(ctx context.Context, req *codec.Frame, rsp
func RegisterMeterServiceServer(s server.Server, sh MeterServiceServer, opts ...server.HandlerOption) error { func RegisterMeterServiceServer(s server.Server, sh MeterServiceServer, opts ...server.HandlerOption) error {
type meterService interface { type meterService interface {
Metrics(ctx context.Context, req *codec.Frame, rsp *codec.Frame) error
} }
type MeterService struct { type MeterService struct {
meterService meterService
} }
h := &meterServiceServer{sh} h := &meterServiceServer{sh}
var nopts []server.HandlerOption var nopts []server.HandlerOption
nopts = append(nopts, v3.HandlerMetadata(MeterServiceServerEndpoints)) nopts = append(nopts, v3.HandlerEndpoints(MeterServiceServerEndpoints))
return s.Handle(s.NewHandler(&MeterService{h}, append(nopts, opts...)...)) return s.Handle(s.NewHandler(&MeterService{h}, append(nopts, opts...)...))
} }

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT. // Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-micro v3.5.3 // - protoc-gen-go-micro v3.10.2
// - protoc v3.21.12 // - protoc v3.21.12
// source: health.proto // source: health.proto
@ -8,26 +8,35 @@ package health
import ( import (
context "context" context "context"
v3 "go.unistack.org/micro-server-http/v3"
codec "go.unistack.org/micro/v3/codec" codec "go.unistack.org/micro/v3/codec"
http "net/http"
) )
var ( var (
HealthServiceName = "HealthService" HealthServiceName = "HealthService"
) )
var ( var (
HealthServiceServerEndpoints = map[string]map[string]string{ HealthServiceServerEndpoints = []v3.EndpointMetadata{
"/live": map[string]string{ {
"Method": http.MethodGet, Name: "HealthService.Live",
"Stream": "false", Path: "/live",
Method: "GET",
Body: "",
Stream: false,
}, },
"/ready": map[string]string{ {
"Method": http.MethodGet, Name: "HealthService.Ready",
"Stream": "false", Path: "/ready",
Method: "GET",
Body: "",
Stream: false,
}, },
"/version": map[string]string{ {
"Method": http.MethodGet, Name: "HealthService.Version",
"Stream": "false", Path: "/version",
Method: "GET",
Body: "",
Stream: false,
}, },
} }
) )

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT. // Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3 // protoc-gen-go-micro version: v3.10.2
// source: health.proto // source: health.proto
package health package health
@ -29,12 +29,15 @@ func (h *healthServiceServer) Version(ctx context.Context, req *codec.Frame, rsp
func RegisterHealthServiceServer(s server.Server, sh HealthServiceServer, opts ...server.HandlerOption) error { func RegisterHealthServiceServer(s server.Server, sh HealthServiceServer, opts ...server.HandlerOption) error {
type healthService interface { 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 { type HealthService struct {
healthService healthService
} }
h := &healthServiceServer{sh} h := &healthServiceServer{sh}
var nopts []server.HandlerOption var nopts []server.HandlerOption
nopts = append(nopts, v3.HandlerMetadata(HealthServiceServerEndpoints)) nopts = append(nopts, v3.HandlerEndpoints(HealthServiceServerEndpoints))
return s.Handle(s.NewHandler(&HealthService{h}, append(nopts, opts...)...)) return s.Handle(s.NewHandler(&HealthService{h}, append(nopts, opts...)...))
} }