github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/middleware/middleware_test/echo_server.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: middleware/middleware_test/echo_server.proto
     3  
     4  package middleware_test
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	grpc "google.golang.org/grpc"
    11  	codes "google.golang.org/grpc/codes"
    12  	status "google.golang.org/grpc/status"
    13  	math "math"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  type Msg struct {
    28  	Body                 []byte   `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
    29  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    30  	XXX_unrecognized     []byte   `json:"-"`
    31  	XXX_sizecache        int32    `json:"-"`
    32  }
    33  
    34  func (m *Msg) Reset()         { *m = Msg{} }
    35  func (m *Msg) String() string { return proto.CompactTextString(m) }
    36  func (*Msg) ProtoMessage()    {}
    37  func (*Msg) Descriptor() ([]byte, []int) {
    38  	return fileDescriptor_812daae5e8bfec37, []int{0}
    39  }
    40  
    41  func (m *Msg) XXX_Unmarshal(b []byte) error {
    42  	return xxx_messageInfo_Msg.Unmarshal(m, b)
    43  }
    44  func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    45  	return xxx_messageInfo_Msg.Marshal(b, m, deterministic)
    46  }
    47  func (m *Msg) XXX_Merge(src proto.Message) {
    48  	xxx_messageInfo_Msg.Merge(m, src)
    49  }
    50  func (m *Msg) XXX_Size() int {
    51  	return xxx_messageInfo_Msg.Size(m)
    52  }
    53  func (m *Msg) XXX_DiscardUnknown() {
    54  	xxx_messageInfo_Msg.DiscardUnknown(m)
    55  }
    56  
    57  var xxx_messageInfo_Msg proto.InternalMessageInfo
    58  
    59  func (m *Msg) GetBody() []byte {
    60  	if m != nil {
    61  		return m.Body
    62  	}
    63  	return nil
    64  }
    65  
    66  func init() {
    67  	proto.RegisterType((*Msg)(nil), "middleware.Msg")
    68  }
    69  
    70  func init() {
    71  	proto.RegisterFile("middleware/middleware_test/echo_server.proto", fileDescriptor_812daae5e8bfec37)
    72  }
    73  
    74  var fileDescriptor_812daae5e8bfec37 = []byte{
    75  	// 170 bytes of a gzipped FileDescriptorProto
    76  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc9, 0xcd, 0x4c, 0x49,
    77  	0xc9, 0x49, 0x2d, 0x4f, 0x2c, 0x4a, 0xd5, 0x47, 0x30, 0xe3, 0x4b, 0x52, 0x8b, 0x4b, 0xf4, 0x53,
    78  	0x93, 0x33, 0xf2, 0xe3, 0x8b, 0x53, 0x8b, 0xca, 0x52, 0x8b, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2,
    79  	0x85, 0xb8, 0x10, 0x4a, 0x94, 0x24, 0xb9, 0x98, 0x7d, 0x8b, 0xd3, 0x85, 0x84, 0xb8, 0x58, 0x92,
    80  	0xf2, 0x53, 0x2a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, 0xc0, 0x6c, 0x23, 0x7b, 0x2e, 0x2e,
    81  	0xd7, 0xe4, 0x8c, 0xfc, 0x60, 0xb0, 0x56, 0x21, 0x43, 0x2e, 0xf6, 0x80, 0xa2, 0xfc, 0xe4, 0xd4,
    82  	0xe2, 0x62, 0x21, 0x7e, 0x3d, 0x84, 0x01, 0x7a, 0xbe, 0xc5, 0xe9, 0x52, 0xe8, 0x02, 0x4a, 0x0c,
    83  	0x1a, 0x8c, 0x06, 0x8c, 0x4e, 0x96, 0x51, 0xe6, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9,
    84  	0xf9, 0xb9, 0xfa, 0xe5, 0xa9, 0x89, 0x65, 0xa9, 0xe5, 0xf9, 0x45, 0xd9, 0xc5, 0xfa, 0xc9, 0xf9,
    85  	0xb9, 0xb9, 0xf9, 0x79, 0xfa, 0xb8, 0x1d, 0x9d, 0xc4, 0x06, 0x76, 0xa9, 0x31, 0x20, 0x00, 0x00,
    86  	0xff, 0xff, 0x5e, 0x2c, 0xc1, 0xca, 0xd9, 0x00, 0x00, 0x00,
    87  }
    88  
    89  // Reference imports to suppress errors if they are not otherwise used.
    90  var _ context.Context
    91  var _ grpc.ClientConn
    92  
    93  // This is a compile-time assertion to ensure that this generated file
    94  // is compatible with the grpc package it is being compiled against.
    95  const _ = grpc.SupportPackageIsVersion4
    96  
    97  // EchoServerClient is the client API for EchoServer service.
    98  //
    99  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   100  type EchoServerClient interface {
   101  	Process(ctx context.Context, opts ...grpc.CallOption) (EchoServer_ProcessClient, error)
   102  }
   103  
   104  type echoServerClient struct {
   105  	cc *grpc.ClientConn
   106  }
   107  
   108  func NewEchoServerClient(cc *grpc.ClientConn) EchoServerClient {
   109  	return &echoServerClient{cc}
   110  }
   111  
   112  func (c *echoServerClient) Process(ctx context.Context, opts ...grpc.CallOption) (EchoServer_ProcessClient, error) {
   113  	stream, err := c.cc.NewStream(ctx, &_EchoServer_serviceDesc.Streams[0], "/middleware.EchoServer/Process", opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	x := &echoServerProcessClient{stream}
   118  	return x, nil
   119  }
   120  
   121  type EchoServer_ProcessClient interface {
   122  	Send(*Msg) error
   123  	Recv() (*Msg, error)
   124  	grpc.ClientStream
   125  }
   126  
   127  type echoServerProcessClient struct {
   128  	grpc.ClientStream
   129  }
   130  
   131  func (x *echoServerProcessClient) Send(m *Msg) error {
   132  	return x.ClientStream.SendMsg(m)
   133  }
   134  
   135  func (x *echoServerProcessClient) Recv() (*Msg, error) {
   136  	m := new(Msg)
   137  	if err := x.ClientStream.RecvMsg(m); err != nil {
   138  		return nil, err
   139  	}
   140  	return m, nil
   141  }
   142  
   143  // EchoServerServer is the server API for EchoServer service.
   144  type EchoServerServer interface {
   145  	Process(EchoServer_ProcessServer) error
   146  }
   147  
   148  // UnimplementedEchoServerServer can be embedded to have forward compatible implementations.
   149  type UnimplementedEchoServerServer struct {
   150  }
   151  
   152  func (*UnimplementedEchoServerServer) Process(srv EchoServer_ProcessServer) error {
   153  	return status.Errorf(codes.Unimplemented, "method Process not implemented")
   154  }
   155  
   156  func RegisterEchoServerServer(s *grpc.Server, srv EchoServerServer) {
   157  	s.RegisterService(&_EchoServer_serviceDesc, srv)
   158  }
   159  
   160  func _EchoServer_Process_Handler(srv interface{}, stream grpc.ServerStream) error {
   161  	return srv.(EchoServerServer).Process(&echoServerProcessServer{stream})
   162  }
   163  
   164  type EchoServer_ProcessServer interface {
   165  	Send(*Msg) error
   166  	Recv() (*Msg, error)
   167  	grpc.ServerStream
   168  }
   169  
   170  type echoServerProcessServer struct {
   171  	grpc.ServerStream
   172  }
   173  
   174  func (x *echoServerProcessServer) Send(m *Msg) error {
   175  	return x.ServerStream.SendMsg(m)
   176  }
   177  
   178  func (x *echoServerProcessServer) Recv() (*Msg, error) {
   179  	m := new(Msg)
   180  	if err := x.ServerStream.RecvMsg(m); err != nil {
   181  		return nil, err
   182  	}
   183  	return m, nil
   184  }
   185  
   186  var _EchoServer_serviceDesc = grpc.ServiceDesc{
   187  	ServiceName: "middleware.EchoServer",
   188  	HandlerType: (*EchoServerServer)(nil),
   189  	Methods:     []grpc.MethodDesc{},
   190  	Streams: []grpc.StreamDesc{
   191  		{
   192  			StreamName:    "Process",
   193  			Handler:       _EchoServer_Process_Handler,
   194  			ServerStreams: true,
   195  			ClientStreams: true,
   196  		},
   197  	},
   198  	Metadata: "middleware/middleware_test/echo_server.proto",
   199  }