update all deps to latest versions
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
46
server/grpc/proto/test_micro_grpc.pb.go
Normal file
46
server/grpc/proto/test_micro_grpc.pb.go
Normal file
@@ -0,0 +1,46 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// source: test.proto
|
||||
package helloworld
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
micro_client "github.com/unistack-org/micro/v3/client"
|
||||
micro_server "github.com/unistack-org/micro/v3/server"
|
||||
)
|
||||
|
||||
var (
|
||||
_ micro_server.Option
|
||||
_ micro_client.Option
|
||||
)
|
||||
|
||||
type testService struct {
|
||||
c micro_client.Client
|
||||
name string
|
||||
}
|
||||
|
||||
// Micro client stuff
|
||||
|
||||
// NewTestService create new service client
|
||||
func NewTestService(name string, c micro_client.Client) TestService {
|
||||
return &testService{c: c, name: name}
|
||||
}
|
||||
|
||||
func (c *testService) Call(ctx context.Context, req *Request, opts ...micro_client.CallOption) (*Response, error) {
|
||||
rsp := &Response{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Test.Call", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
// Micro server stuff
|
||||
|
||||
type testHandler struct {
|
||||
TestHandler
|
||||
}
|
||||
|
||||
func (h *testHandler) Call(ctx context.Context, req *Request, rsp *Response) error {
|
||||
return h.TestHandler.Call(ctx, req, rsp)
|
||||
}
|
Reference in New Issue
Block a user