minor tweaks for config changes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-03-15 01:17:29 +03:00
parent 82e181cc22
commit 5cc7e03901
8 changed files with 93 additions and 1077 deletions

View File

@@ -1,5 +1,7 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3
// versions:
// - protoc-gen-go-micro v3.10.2
// - protoc v3.21.12
// source: service.proto
package servicepb
@@ -7,19 +9,16 @@ package servicepb
import (
context "context"
proto "go.unistack.org/micro-config-service/v3/proto"
api "go.unistack.org/micro/v3/api"
v3 "go.unistack.org/micro-server-http/v3"
client "go.unistack.org/micro/v3/client"
)
var (
ConfigName = "Config"
ConfigEndpoints = []api.Endpoint{}
)
func NewConfigEndpoints() []api.Endpoint {
return ConfigEndpoints
}
var (
ConfigServerEndpoints = []v3.EndpointMetadata{}
)
type ConfigClient interface {
Load(ctx context.Context, req *proto.LoadRequest, opts ...client.CallOption) (*proto.LoadResponse, error)

View File

@@ -1,5 +1,5 @@
// 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: service.proto
package servicepb
@@ -7,7 +7,6 @@ package servicepb
import (
context "context"
proto "go.unistack.org/micro-config-service/v3/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
)
@@ -61,8 +60,5 @@ func RegisterConfigServer(s server.Server, sh ConfigServer, opts ...server.Handl
}
h := &configServer{sh}
var nopts []server.HandlerOption
for _, endpoint := range ConfigEndpoints {
nopts = append(nopts, api.WithEndpoint(&endpoint))
}
return s.Handle(s.NewHandler(&Config{h}, append(nopts, opts...)...))
}