Documentation
¶
Index ¶
- Variables
- func RegisterPingServer(s *grpc.Server, srv PingServer)
- type PingClient
- type PingReq
- func (*PingReq) Descriptor() ([]byte, []int)
- func (m *PingReq) GetPeerId() []byte
- func (m *PingReq) GetTimes() uint32
- func (m *PingReq) Marshal() (dAtA []byte, err error)
- func (m *PingReq) MarshalTo(dAtA []byte) (int, error)
- func (*PingReq) ProtoMessage()
- func (m *PingReq) Reset()
- func (m *PingReq) Size() (n int)
- func (m *PingReq) String() string
- func (m *PingReq) Unmarshal(dAtA []byte) error
- func (m *PingReq) XXX_DiscardUnknown()
- func (m *PingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *PingReq) XXX_Merge(src proto.Message)
- func (m *PingReq) XXX_Size() int
- func (m *PingReq) XXX_Unmarshal(b []byte) error
- type PingServer
- type Ping_PingClient
- type Ping_PingServer
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetLatency() int64
- func (m *Response) Marshal() (dAtA []byte, err error)
- func (m *Response) MarshalTo(dAtA []byte) (int, error)
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) Size() (n int)
- func (m *Response) String() string
- func (m *Response) Unmarshal(dAtA []byte) error
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthPing = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPing = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterPingServer ¶
func RegisterPingServer(s *grpc.Server, srv PingServer)
Types ¶
type PingClient ¶
type PingClient interface { // Pings an address and streams responses. Ping(ctx context.Context, in *PingReq, opts ...grpc.CallOption) (Ping_PingClient, error) }
func NewPingClient ¶
func NewPingClient(cc *grpc.ClientConn) PingClient
type PingReq ¶
type PingReq struct { PeerId []byte `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` Times uint32 `protobuf:"varint,2,opt,name=times,proto3" json:"times,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The ping request message.
func (*PingReq) Descriptor ¶
func (*PingReq) ProtoMessage ¶
func (*PingReq) ProtoMessage()
func (*PingReq) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *PingReq) XXX_DiscardUnknown()
func (*PingReq) XXX_Marshal ¶ added in v0.2.0
func (*PingReq) XXX_Unmarshal ¶ added in v0.2.0
type PingServer ¶
type PingServer interface { // Pings an address and streams responses. Ping(*PingReq, Ping_PingServer) error }
type Ping_PingClient ¶
type Ping_PingClient interface { Recv() (*Response, error) grpc.ClientStream }
type Ping_PingServer ¶
type Ping_PingServer interface { Send(*Response) error grpc.ServerStream }
type Response ¶
type Response struct { Latency int64 `protobuf:"varint,1,opt,name=latency,proto3" json:"latency,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing the latenty.
func (*Response) Descriptor ¶
func (*Response) GetLatency ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶ added in v0.2.0
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶ added in v0.2.0
func (*Response) XXX_Unmarshal ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.