123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.2.0
- // - protoc v3.19.4
- // source: pb/flowsrv.proto
- package pb
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- // FlowsrvClient is the client API for Flowsrv service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
- type FlowsrvClient interface {
- Connect(ctx context.Context, in *CommandReq, opts ...grpc.CallOption) (Flowsrv_ConnectClient, error)
- }
- type flowsrvClient struct {
- cc grpc.ClientConnInterface
- }
- func NewFlowsrvClient(cc grpc.ClientConnInterface) FlowsrvClient {
- return &flowsrvClient{cc}
- }
- func (c *flowsrvClient) Connect(ctx context.Context, in *CommandReq, opts ...grpc.CallOption) (Flowsrv_ConnectClient, error) {
- stream, err := c.cc.NewStream(ctx, &Flowsrv_ServiceDesc.Streams[0], "/pb.Flowsrv/connect", opts...)
- if err != nil {
- return nil, err
- }
- x := &flowsrvConnectClient{stream}
- if err := x.ClientStream.SendMsg(in); err != nil {
- return nil, err
- }
- if err := x.ClientStream.CloseSend(); err != nil {
- return nil, err
- }
- return x, nil
- }
- type Flowsrv_ConnectClient interface {
- Recv() (*CommandResp, error)
- grpc.ClientStream
- }
- type flowsrvConnectClient struct {
- grpc.ClientStream
- }
- func (x *flowsrvConnectClient) Recv() (*CommandResp, error) {
- m := new(CommandResp)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- // FlowsrvServer is the server API for Flowsrv service.
- // All implementations must embed UnimplementedFlowsrvServer
- // for forward compatibility
- type FlowsrvServer interface {
- Connect(*CommandReq, Flowsrv_ConnectServer) error
- mustEmbedUnimplementedFlowsrvServer()
- }
- // UnimplementedFlowsrvServer must be embedded to have forward compatible implementations.
- type UnimplementedFlowsrvServer struct {
- }
- func (UnimplementedFlowsrvServer) Connect(*CommandReq, Flowsrv_ConnectServer) error {
- return status.Errorf(codes.Unimplemented, "method Connect not implemented")
- }
- func (UnimplementedFlowsrvServer) mustEmbedUnimplementedFlowsrvServer() {}
- // UnsafeFlowsrvServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to FlowsrvServer will
- // result in compilation errors.
- type UnsafeFlowsrvServer interface {
- mustEmbedUnimplementedFlowsrvServer()
- }
- func RegisterFlowsrvServer(s grpc.ServiceRegistrar, srv FlowsrvServer) {
- s.RegisterService(&Flowsrv_ServiceDesc, srv)
- }
- func _Flowsrv_Connect_Handler(srv interface{}, stream grpc.ServerStream) error {
- m := new(CommandReq)
- if err := stream.RecvMsg(m); err != nil {
- return err
- }
- return srv.(FlowsrvServer).Connect(m, &flowsrvConnectServer{stream})
- }
- type Flowsrv_ConnectServer interface {
- Send(*CommandResp) error
- grpc.ServerStream
- }
- type flowsrvConnectServer struct {
- grpc.ServerStream
- }
- func (x *flowsrvConnectServer) Send(m *CommandResp) error {
- return x.ServerStream.SendMsg(m)
- }
- // Flowsrv_ServiceDesc is the grpc.ServiceDesc for Flowsrv service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Flowsrv_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "pb.Flowsrv",
- HandlerType: (*FlowsrvServer)(nil),
- Methods: []grpc.MethodDesc{},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "connect",
- Handler: _Flowsrv_Connect_Handler,
- ServerStreams: true,
- },
- },
- Metadata: "pb/flowsrv.proto",
- }
|