@@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-micro v3.5.3
|
||||
// - protoc-gen-go-micro v3.10.1
|
||||
// - protoc v3.21.12
|
||||
// source: test.proto
|
||||
|
||||
@@ -8,19 +8,16 @@ package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
v3 "go.unistack.org/micro-server-http/v3"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
)
|
||||
|
||||
var (
|
||||
TestName = "Test"
|
||||
|
||||
TestEndpoints = []api.Endpoint{}
|
||||
)
|
||||
|
||||
func NewTestEndpoints() []api.Endpoint {
|
||||
return TestEndpoints
|
||||
}
|
||||
var (
|
||||
TestServerEndpoints = []v3.EndpointMetadata{}
|
||||
)
|
||||
|
||||
type TestClient interface {
|
||||
Call(ctx context.Context, req *Request, opts ...client.CallOption) (*Response, error)
|
||||
|
@@ -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.1
|
||||
// source: test.proto
|
||||
|
||||
package pb
|
||||
@@ -7,7 +7,7 @@ package pb
|
||||
import (
|
||||
context "context"
|
||||
_ "go.unistack.org/micro-client-http/v3"
|
||||
api "go.unistack.org/micro/v3/api"
|
||||
v3 "go.unistack.org/micro-server-http/v3"
|
||||
client "go.unistack.org/micro/v3/client"
|
||||
server "go.unistack.org/micro/v3/server"
|
||||
)
|
||||
@@ -47,8 +47,6 @@ func RegisterTestServer(s server.Server, sh TestServer, opts ...server.HandlerOp
|
||||
}
|
||||
h := &testServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
for _, endpoint := range TestEndpoints {
|
||||
nopts = append(nopts, api.WithEndpoint(&endpoint))
|
||||
}
|
||||
nopts = append(nopts, v3.HandlerEndpoints(TestServerEndpoints))
|
||||
return s.Handle(s.NewHandler(&Test{h}, append(nopts, opts...)...))
|
||||
}
|
||||
|
Reference in New Issue
Block a user