update for latest micro changes
Some checks failed
codeql / analyze (go) (pull_request) Failing after 3m20s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 1m29s
prbuild / lint (pull_request) Failing after 2m41s
autoapprove / autoapprove (pull_request) Failing after 1m25s
automerge / automerge (pull_request) Failing after 4s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-08-15 07:43:43 +03:00
parent 106ef7ba77
commit c36b9e002f
9 changed files with 79 additions and 81 deletions

View File

@@ -1,31 +0,0 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v4.0.0
// - protoc v3.21.12
// source: service.proto
package servicepb
import (
context "context"
proto "go.unistack.org/micro-config-service/v4/proto"
v4 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v4/client"
)
var (
ConfigServiceName = "ConfigService"
)
var (
ConfigServiceServerEndpoints = []v4.EndpointMetadata{}
)
type ConfigServiceClient interface {
Load(ctx context.Context, req *proto.LoadRequest, opts ...client.CallOption) (*proto.LoadResponse, error)
Save(ctx context.Context, req *proto.SaveRequest, opts ...client.CallOption) (*proto.SaveResponse, error)
}
type ConfigServiceServer interface {
Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error
Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error
}

View File

@@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v4.0.0
// protoc-gen-go-micro version: v4.0.2
// source: service.proto
package servicepb
@@ -8,6 +8,7 @@ import (
context "context"
proto "go.unistack.org/micro-config-service/v4/proto"
client "go.unistack.org/micro/v4/client"
options "go.unistack.org/micro/v4/options"
server "go.unistack.org/micro/v4/server"
)
@@ -16,11 +17,11 @@ type configServiceClient struct {
name string
}
func NewConfigServiceClient(name string, c client.Client) ConfigServiceClient {
func NewConfigServiceClient(name string, c client.Client) proto.ConfigServiceClient {
return &configServiceClient{c: c, name: name}
}
func (c *configServiceClient) Load(ctx context.Context, req *proto.LoadRequest, opts ...client.CallOption) (*proto.LoadResponse, error) {
func (c *configServiceClient) Load(ctx context.Context, req *proto.LoadRequest, opts ...options.Option) (*proto.LoadResponse, error) {
rsp := &proto.LoadResponse{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "ConfigService.Load", req), rsp, opts...)
if err != nil {
@@ -29,7 +30,7 @@ func (c *configServiceClient) Load(ctx context.Context, req *proto.LoadRequest,
return rsp, nil
}
func (c *configServiceClient) Save(ctx context.Context, req *proto.SaveRequest, opts ...client.CallOption) (*proto.SaveResponse, error) {
func (c *configServiceClient) Save(ctx context.Context, req *proto.SaveRequest, opts ...options.Option) (*proto.SaveResponse, error) {
rsp := &proto.SaveResponse{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "ConfigService.Save", req), rsp, opts...)
if err != nil {
@@ -39,7 +40,7 @@ func (c *configServiceClient) Save(ctx context.Context, req *proto.SaveRequest,
}
type configServiceServer struct {
ConfigServiceServer
proto.ConfigServiceServer
}
func (h *configServiceServer) Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error {
@@ -50,7 +51,7 @@ func (h *configServiceServer) Save(ctx context.Context, req *proto.SaveRequest,
return h.ConfigServiceServer.Save(ctx, req, rsp)
}
func RegisterConfigServiceServer(s server.Server, sh ConfigServiceServer, opts ...server.HandlerOption) error {
func RegisterConfigServiceServer(s server.Server, sh proto.ConfigServiceServer, opts ...options.Option) error {
type configService interface {
Load(ctx context.Context, req *proto.LoadRequest, rsp *proto.LoadResponse) error
Save(ctx context.Context, req *proto.SaveRequest, rsp *proto.SaveResponse) error
@@ -59,6 +60,6 @@ func RegisterConfigServiceServer(s server.Server, sh ConfigServiceServer, opts .
configService
}
h := &configServiceServer{sh}
var nopts []server.HandlerOption
return s.Handle(s.NewHandler(&ConfigService{h}, append(nopts, opts...)...))
var nopts []options.Option
return s.Handle(&ConfigService{h}, append(nopts, opts...)...)
}