Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-12-11 02:00:29 +03:00
parent e7e1ff15f4
commit 1aa324c17f
63 changed files with 2488 additions and 1165 deletions

View File

@@ -1,14 +1,13 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// versions:
// - protoc-gen-go-micro v3.10.2
// - protoc v3.21.12
// - protoc-gen-go-micro v3.10.4
// - protoc v5.28.3
// source: test.proto
package helloworld
import (
context "context"
v3 "go.unistack.org/micro-server-http/v3"
proto "go.unistack.org/micro-tests/client/grpc/proto"
client "go.unistack.org/micro/v3/client"
metadata "go.unistack.org/micro/v3/metadata"
@@ -17,9 +16,6 @@ import (
var (
TestName = "Test"
)
var (
TestServerEndpoints = []v3.EndpointMetadata{}
)
type TestClient interface {
Call(ctx context.Context, req *proto.Request, opts ...client.CallOption) (*proto.Response, error)

View File

@@ -1,12 +1,11 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.10.2
// protoc-gen-go-micro version: v3.10.4
// source: test.proto
package helloworld
import (
context "context"
v3 "go.unistack.org/micro-server-http/v3"
proto "go.unistack.org/micro-tests/client/grpc/proto"
client "go.unistack.org/micro/v3/client"
metadata "go.unistack.org/micro/v3/metadata"
@@ -18,7 +17,7 @@ type testClient struct {
name string
}
func NewTestClient(name string, c client.Client) TestClient {
func NewTestClient(name string, c client.Client) proto.TestClient {
return &testClient{c: c, name: name}
}
@@ -80,7 +79,7 @@ func (s *testClientStream) Recv() (*proto.Response, error) {
}
type testServer struct {
TestServer
proto.TestServer
}
func (h *testServer) Call(ctx context.Context, req *proto.Request, rsp *proto.Response) error {
@@ -123,7 +122,7 @@ func (s *testStreamStream) Recv() (*proto.Request, error) {
return msg, nil
}
func RegisterTestServer(s server.Server, sh TestServer, opts ...server.HandlerOption) error {
func RegisterTestServer(s server.Server, sh proto.TestServer, opts ...server.HandlerOption) error {
type test interface {
Call(ctx context.Context, req *proto.Request, rsp *proto.Response) error
Stream(ctx context.Context, stream server.Stream) error
@@ -133,6 +132,5 @@ func RegisterTestServer(s server.Server, sh TestServer, opts ...server.HandlerOp
}
h := &testServer{sh}
var nopts []server.HandlerOption
nopts = append(nopts, v3.HandlerEndpoints(TestServerEndpoints))
return s.Handle(s.NewHandler(&Test{h}, append(nopts, opts...)...))
}