Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v5.28.3
|
||||
// protoc v5.29.2
|
||||
// source: test.proto
|
||||
|
||||
package pb
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-micro v3.10.4
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.2
|
||||
// source: test.proto
|
||||
|
||||
package pb
|
||||
|
@@ -58,6 +58,5 @@ func RegisterTestServiceServer(s server.Server, sh TestServiceServer, opts ...se
|
||||
testService
|
||||
}
|
||||
h := &testServiceServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
return s.Handle(s.NewHandler(&TestService{h}, append(nopts, opts...)...))
|
||||
return s.Handle(s.NewHandler(&TestService{h}, opts...))
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-micro v3.10.4
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.2
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
@@ -26,6 +26,8 @@ type Test_StreamClient interface {
|
||||
Context() context.Context
|
||||
SendMsg(msg interface{}) error
|
||||
RecvMsg(msg interface{}) error
|
||||
CloseAndRecv() (*proto.Response, error)
|
||||
CloseSend() error
|
||||
Close() error
|
||||
Header() metadata.Metadata
|
||||
Send(msg *proto.Request) error
|
||||
@@ -41,6 +43,7 @@ type Test_StreamStream interface {
|
||||
Context() context.Context
|
||||
SendMsg(msg interface{}) error
|
||||
RecvMsg(msg interface{}) error
|
||||
SendAndClose(msg *proto.Response) error
|
||||
Close() error
|
||||
Recv() (*proto.Request, error)
|
||||
Send(msg *proto.Response) error
|
||||
|
@@ -30,7 +30,7 @@ func (c *testClient) Call(ctx context.Context, req *proto.Request, opts ...clien
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *testClient) Stream(ctx context.Context, opts ...client.CallOption) (Test_StreamClient, error) {
|
||||
func (c *testClient) Stream(ctx context.Context, opts ...client.CallOption) (proto.Test_StreamClient, error) {
|
||||
stream, err := c.c.Stream(ctx, c.c.NewRequest(c.name, "Test.Stream", &proto.Request{}), opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -42,6 +42,18 @@ type testClientStream struct {
|
||||
stream client.Stream
|
||||
}
|
||||
|
||||
func (s *testClientStream) CloseAndRecv() (*proto.Response, error) {
|
||||
msg := &proto.Response{}
|
||||
err := s.RecvMsg(msg)
|
||||
if err == nil {
|
||||
err = s.Close()
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
func (s *testClientStream) Close() error {
|
||||
return s.stream.Close()
|
||||
}
|
||||
@@ -94,6 +106,13 @@ type testStreamStream struct {
|
||||
stream server.Stream
|
||||
}
|
||||
|
||||
func (s *testStreamStream) SendAndClose(msg *proto.Response) error {
|
||||
err := s.SendMsg(msg)
|
||||
if err == nil {
|
||||
err = s.stream.Close()
|
||||
}
|
||||
return err
|
||||
}
|
||||
func (s *testStreamStream) Close() error {
|
||||
return s.stream.Close()
|
||||
}
|
||||
@@ -131,6 +150,5 @@ func RegisterTestServer(s server.Server, sh proto.TestServer, opts ...server.Han
|
||||
test
|
||||
}
|
||||
h := &testServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
return s.Handle(s.NewHandler(&Test{h}, append(nopts, opts...)...))
|
||||
return s.Handle(s.NewHandler(&Test{h}, opts...))
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v5.28.3
|
||||
// protoc v5.29.2
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.2
|
||||
// source: test.proto
|
||||
|
||||
package helloworld
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v5.28.3
|
||||
// protoc v5.29.2
|
||||
// source: github.proto
|
||||
|
||||
package pb
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-micro v3.10.4
|
||||
// - protoc v5.28.3
|
||||
// - protoc v5.29.2
|
||||
// source: github.proto
|
||||
|
||||
package pb
|
||||
|
@@ -98,7 +98,6 @@ func RegisterGithubServer(s server.Server, sh GithubServer, opts ...server.Handl
|
||||
github
|
||||
}
|
||||
h := &githubServer{sh}
|
||||
var nopts []server.HandlerOption
|
||||
nopts = append(nopts, v3.HandlerEndpoints(GithubServerEndpoints))
|
||||
return s.Handle(s.NewHandler(&Github{h}, append(nopts, opts...)...))
|
||||
opts = append(opts, v3.HandlerEndpoints(GithubServerEndpoints))
|
||||
return s.Handle(s.NewHandler(&Github{h}, opts...))
|
||||
}
|
||||
|
Reference in New Issue
Block a user