1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: ping.proto 3 4/* 5Package fgrpc is a generated protocol buffer package. 6 7It is generated from these files: 8 ping.proto 9 10It has these top-level messages: 11 PingMessage 12*/ 13package fgrpc 14 15import proto "github.com/golang/protobuf/proto" 16import fmt "fmt" 17import math "math" 18 19import ( 20 context "golang.org/x/net/context" 21 grpc "google.golang.org/grpc" 22) 23 24// Reference imports to suppress errors if they are not otherwise used. 25var _ = proto.Marshal 26var _ = fmt.Errorf 27var _ = math.Inf 28 29// This is a compile-time assertion to ensure that this generated file 30// is compatible with the proto package it is being compiled against. 31// A compilation error at this line likely means your copy of the 32// proto package needs to be updated. 33const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 34 35type PingMessage struct { 36 Seq int64 `protobuf:"varint,1,opt,name=seq" json:"seq,omitempty"` 37 Ts int64 `protobuf:"varint,2,opt,name=ts" json:"ts,omitempty"` 38 Payload string `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"` 39 DelayNanos int64 `protobuf:"varint,4,opt,name=delayNanos" json:"delayNanos,omitempty"` 40} 41 42func (m *PingMessage) Reset() { *m = PingMessage{} } 43func (m *PingMessage) String() string { return proto.CompactTextString(m) } 44func (*PingMessage) ProtoMessage() {} 45func (*PingMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 46 47func (m *PingMessage) GetSeq() int64 { 48 if m != nil { 49 return m.Seq 50 } 51 return 0 52} 53 54func (m *PingMessage) GetTs() int64 { 55 if m != nil { 56 return m.Ts 57 } 58 return 0 59} 60 61func (m *PingMessage) GetPayload() string { 62 if m != nil { 63 return m.Payload 64 } 65 return "" 66} 67 68func (m *PingMessage) GetDelayNanos() int64 { 69 if m != nil { 70 return m.DelayNanos 71 } 72 return 0 73} 74 75func init() { 76 proto.RegisterType((*PingMessage)(nil), "fgrpc.PingMessage") 77} 78 79// Reference imports to suppress errors if they are not otherwise used. 80var _ context.Context 81var _ grpc.ClientConn 82 83// This is a compile-time assertion to ensure that this generated file 84// is compatible with the grpc package it is being compiled against. 85const _ = grpc.SupportPackageIsVersion4 86 87// Client API for PingServer service 88 89type PingServerClient interface { 90 Ping(ctx context.Context, in *PingMessage, opts ...grpc.CallOption) (*PingMessage, error) 91} 92 93type pingServerClient struct { 94 cc *grpc.ClientConn 95} 96 97func NewPingServerClient(cc *grpc.ClientConn) PingServerClient { 98 return &pingServerClient{cc} 99} 100 101func (c *pingServerClient) Ping(ctx context.Context, in *PingMessage, opts ...grpc.CallOption) (*PingMessage, error) { 102 out := new(PingMessage) 103 err := grpc.Invoke(ctx, "/fgrpc.PingServer/Ping", in, out, c.cc, opts...) 104 if err != nil { 105 return nil, err 106 } 107 return out, nil 108} 109 110// Server API for PingServer service 111 112type PingServerServer interface { 113 Ping(context.Context, *PingMessage) (*PingMessage, error) 114} 115 116func RegisterPingServerServer(s *grpc.Server, srv PingServerServer) { 117 s.RegisterService(&_PingServer_serviceDesc, srv) 118} 119 120func _PingServer_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 121 in := new(PingMessage) 122 if err := dec(in); err != nil { 123 return nil, err 124 } 125 if interceptor == nil { 126 return srv.(PingServerServer).Ping(ctx, in) 127 } 128 info := &grpc.UnaryServerInfo{ 129 Server: srv, 130 FullMethod: "/fgrpc.PingServer/Ping", 131 } 132 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 133 return srv.(PingServerServer).Ping(ctx, req.(*PingMessage)) 134 } 135 return interceptor(ctx, in, info, handler) 136} 137 138var _PingServer_serviceDesc = grpc.ServiceDesc{ 139 ServiceName: "fgrpc.PingServer", 140 HandlerType: (*PingServerServer)(nil), 141 Methods: []grpc.MethodDesc{ 142 { 143 MethodName: "Ping", 144 Handler: _PingServer_Ping_Handler, 145 }, 146 }, 147 Streams: []grpc.StreamDesc{}, 148 Metadata: "ping.proto", 149} 150 151func init() { proto.RegisterFile("ping.proto", fileDescriptor0) } 152 153var fileDescriptor0 = []byte{ 154 // 163 bytes of a gzipped FileDescriptorProto 155 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xc8, 0xcc, 0x4b, 156 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4d, 0x4b, 0x2f, 0x2a, 0x48, 0x56, 0xca, 0xe4, 157 0xe2, 0x0e, 0xc8, 0xcc, 0x4b, 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x12, 0xe0, 0x62, 158 0x2e, 0x4e, 0x2d, 0x94, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x02, 0x31, 0x85, 0xf8, 0xb8, 0x98, 159 0x4a, 0x8a, 0x25, 0x98, 0xc0, 0x02, 0x4c, 0x25, 0xc5, 0x42, 0x12, 0x5c, 0xec, 0x05, 0x89, 0x95, 160 0x39, 0xf9, 0x89, 0x29, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x90, 0x1c, 0x17, 161 0x57, 0x4a, 0x6a, 0x4e, 0x62, 0xa5, 0x5f, 0x62, 0x5e, 0x7e, 0xb1, 0x04, 0x0b, 0x58, 0x07, 0x92, 162 0x88, 0x91, 0x1d, 0x17, 0x17, 0xc8, 0xaa, 0xe0, 0xd4, 0xa2, 0xb2, 0xd4, 0x22, 0x21, 0x03, 0x2e, 163 0x16, 0x10, 0x4f, 0x48, 0x48, 0x0f, 0xec, 0x10, 0x3d, 0x24, 0x57, 0x48, 0x61, 0x11, 0x53, 0x62, 164 0x48, 0x62, 0x03, 0x3b, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x54, 0x22, 0xa0, 0xfe, 0xc6, 165 0x00, 0x00, 0x00, 166} 167