// Code generated by protoc-gen-go. DO NOT EDIT. // source: echoserver/echoserver.proto /* Package echoserver is a generated protocol buffer package. It is generated from these files: echoserver/echoserver.proto It has these top-level messages: EchoRequest EchoResponse Heartbeat Empty */ package echoserver import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "google.golang.org/genproto/googleapis/api/annotations" import ( context "golang.org/x/net/context" grpc "google.golang.org/grpc" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type Heartbeat_Status int32 const ( Heartbeat_UNKNOWN Heartbeat_Status = 0 Heartbeat_OK Heartbeat_Status = 1 ) var Heartbeat_Status_name = map[int32]string{ 0: "UNKNOWN", 1: "OK", } var Heartbeat_Status_value = map[string]int32{ "UNKNOWN": 0, "OK": 1, } func (x Heartbeat_Status) String() string { return proto.EnumName(Heartbeat_Status_name, int32(x)) } func (Heartbeat_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } type EchoRequest struct { Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` } func (m *EchoRequest) Reset() { *m = EchoRequest{} } func (m *EchoRequest) String() string { return proto.CompactTextString(m) } func (*EchoRequest) ProtoMessage() {} func (*EchoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } func (m *EchoRequest) GetMessage() string { if m != nil { return m.Message } return "" } type EchoResponse struct { Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` } func (m *EchoResponse) Reset() { *m = EchoResponse{} } func (m *EchoResponse) String() string { return proto.CompactTextString(m) } func (*EchoResponse) ProtoMessage() {} func (*EchoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func (m *EchoResponse) GetMessage() string { if m != nil { return m.Message } return "" } type Heartbeat struct { Status Heartbeat_Status `protobuf:"varint,1,opt,name=status,enum=echoserver.Heartbeat_Status" json:"status,omitempty"` } func (m *Heartbeat) Reset() { *m = Heartbeat{} } func (m *Heartbeat) String() string { return proto.CompactTextString(m) } func (*Heartbeat) ProtoMessage() {} func (*Heartbeat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } func (m *Heartbeat) GetStatus() Heartbeat_Status { if m != nil { return m.Status } return Heartbeat_UNKNOWN } type Empty struct { } func (m *Empty) Reset() { *m = Empty{} } func (m *Empty) String() string { return proto.CompactTextString(m) } func (*Empty) ProtoMessage() {} func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func init() { proto.RegisterType((*EchoRequest)(nil), "echoserver.EchoRequest") proto.RegisterType((*EchoResponse)(nil), "echoserver.EchoResponse") proto.RegisterType((*Heartbeat)(nil), "echoserver.Heartbeat") proto.RegisterType((*Empty)(nil), "echoserver.Empty") proto.RegisterEnum("echoserver.Heartbeat_Status", Heartbeat_Status_name, Heartbeat_Status_value) } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 // Client API for EchoService service type EchoServiceClient interface { Echo(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoClient, error) Stream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (EchoService_StreamClient, error) Heartbeats(ctx context.Context, opts ...grpc.CallOption) (EchoService_HeartbeatsClient, error) } type echoServiceClient struct { cc *grpc.ClientConn } func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient { return &echoServiceClient{cc} } func (c *echoServiceClient) Echo(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoClient, error) { stream, err := grpc.NewClientStream(ctx, &_EchoService_serviceDesc.Streams[0], c.cc, "/echoserver.EchoService/Echo", opts...) if err != nil { return nil, err } x := &echoServiceEchoClient{stream} return x, nil } type EchoService_EchoClient interface { Send(*EchoRequest) error Recv() (*EchoResponse, error) grpc.ClientStream } type echoServiceEchoClient struct { grpc.ClientStream } func (x *echoServiceEchoClient) Send(m *EchoRequest) error { return x.ClientStream.SendMsg(m) } func (x *echoServiceEchoClient) Recv() (*EchoResponse, error) { m := new(EchoResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *echoServiceClient) Stream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (EchoService_StreamClient, error) { stream, err := grpc.NewClientStream(ctx, &_EchoService_serviceDesc.Streams[1], c.cc, "/echoserver.EchoService/Stream", opts...) if err != nil { return nil, err } x := &echoServiceStreamClient{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 EchoService_StreamClient interface { Recv() (*EchoResponse, error) grpc.ClientStream } type echoServiceStreamClient struct { grpc.ClientStream } func (x *echoServiceStreamClient) Recv() (*EchoResponse, error) { m := new(EchoResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func (c *echoServiceClient) Heartbeats(ctx context.Context, opts ...grpc.CallOption) (EchoService_HeartbeatsClient, error) { stream, err := grpc.NewClientStream(ctx, &_EchoService_serviceDesc.Streams[2], c.cc, "/echoserver.EchoService/Heartbeats", opts...) if err != nil { return nil, err } x := &echoServiceHeartbeatsClient{stream} return x, nil } type EchoService_HeartbeatsClient interface { Send(*Empty) error Recv() (*Heartbeat, error) grpc.ClientStream } type echoServiceHeartbeatsClient struct { grpc.ClientStream } func (x *echoServiceHeartbeatsClient) Send(m *Empty) error { return x.ClientStream.SendMsg(m) } func (x *echoServiceHeartbeatsClient) Recv() (*Heartbeat, error) { m := new(Heartbeat) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // Server API for EchoService service type EchoServiceServer interface { Echo(EchoService_EchoServer) error Stream(*Empty, EchoService_StreamServer) error Heartbeats(EchoService_HeartbeatsServer) error } func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) { s.RegisterService(&_EchoService_serviceDesc, srv) } func _EchoService_Echo_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(EchoServiceServer).Echo(&echoServiceEchoServer{stream}) } type EchoService_EchoServer interface { Send(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream } type echoServiceEchoServer struct { grpc.ServerStream } func (x *echoServiceEchoServer) Send(m *EchoResponse) error { return x.ServerStream.SendMsg(m) } func (x *echoServiceEchoServer) Recv() (*EchoRequest, error) { m := new(EchoRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } func _EchoService_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(Empty) if err := stream.RecvMsg(m); err != nil { return err } return srv.(EchoServiceServer).Stream(m, &echoServiceStreamServer{stream}) } type EchoService_StreamServer interface { Send(*EchoResponse) error grpc.ServerStream } type echoServiceStreamServer struct { grpc.ServerStream } func (x *echoServiceStreamServer) Send(m *EchoResponse) error { return x.ServerStream.SendMsg(m) } func _EchoService_Heartbeats_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(EchoServiceServer).Heartbeats(&echoServiceHeartbeatsServer{stream}) } type EchoService_HeartbeatsServer interface { Send(*Heartbeat) error Recv() (*Empty, error) grpc.ServerStream } type echoServiceHeartbeatsServer struct { grpc.ServerStream } func (x *echoServiceHeartbeatsServer) Send(m *Heartbeat) error { return x.ServerStream.SendMsg(m) } func (x *echoServiceHeartbeatsServer) Recv() (*Empty, error) { m := new(Empty) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } var _EchoService_serviceDesc = grpc.ServiceDesc{ ServiceName: "echoserver.EchoService", HandlerType: (*EchoServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Echo", Handler: _EchoService_Echo_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Stream", Handler: _EchoService_Stream_Handler, ServerStreams: true, }, { StreamName: "Heartbeats", Handler: _EchoService_Heartbeats_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "echoserver/echoserver.proto", } func init() { proto.RegisterFile("echoserver/echoserver.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 303 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xc1, 0x4a, 0xc3, 0x40, 0x10, 0x86, 0xdd, 0x62, 0x13, 0x3a, 0xb5, 0x52, 0x57, 0xc4, 0x52, 0x2b, 0xc8, 0x5e, 0x2c, 0x1e, 0x92, 0x52, 0x3d, 0x79, 0xaf, 0x08, 0x85, 0x04, 0x52, 0xc4, 0xab, 0xdb, 0x30, 0x24, 0x01, 0x93, 0x8d, 0xbb, 0xdb, 0x82, 0x57, 0x5f, 0xc1, 0x47, 0xf3, 0x15, 0x7c, 0x07, 0xaf, 0x92, 0x5d, 0x4d, 0x23, 0x96, 0xde, 0x32, 0x93, 0x6f, 0xfe, 0xf9, 0xff, 0x59, 0x38, 0xc3, 0x38, 0x15, 0x0a, 0xe5, 0x1a, 0xa5, 0xbf, 0xf9, 0xf4, 0x4a, 0x29, 0xb4, 0xa0, 0xb0, 0xe9, 0x0c, 0x47, 0x89, 0x10, 0xc9, 0x33, 0xfa, 0xbc, 0xcc, 0x7c, 0x5e, 0x14, 0x42, 0x73, 0x9d, 0x89, 0x42, 0x59, 0x92, 0x5d, 0x42, 0x77, 0x16, 0xa7, 0x22, 0xc2, 0x97, 0x15, 0x2a, 0x4d, 0x07, 0xe0, 0xe6, 0xa8, 0x14, 0x4f, 0x70, 0x40, 0x2e, 0xc8, 0xb8, 0x13, 0xfd, 0x96, 0x6c, 0x0c, 0x07, 0x16, 0x54, 0xa5, 0x28, 0x14, 0xee, 0x20, 0x9f, 0xa0, 0x73, 0x8f, 0x5c, 0xea, 0x25, 0x72, 0x4d, 0x6f, 0xc0, 0x51, 0x9a, 0xeb, 0x95, 0x32, 0xd4, 0xe1, 0x74, 0xe4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