grpc

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*PingReq) GetPeerId

func (m *PingReq) GetPeerId() []byte

func (*PingReq) GetTimes

func (m *PingReq) GetTimes() uint32

func (*PingReq) Marshal

func (m *PingReq) Marshal() (dAtA []byte, err error)

func (*PingReq) MarshalTo

func (m *PingReq) MarshalTo(dAtA []byte) (int, error)

func (*PingReq) ProtoMessage

func (*PingReq) ProtoMessage()

func (*PingReq) Reset

func (m *PingReq) Reset()

func (*PingReq) Size

func (m *PingReq) Size() (n int)

func (*PingReq) String

func (m *PingReq) String() string

func (*PingReq) Unmarshal

func (m *PingReq) Unmarshal(dAtA []byte) error

func (*PingReq) XXX_DiscardUnknown added in v0.2.0

func (m *PingReq) XXX_DiscardUnknown()

func (*PingReq) XXX_Marshal added in v0.2.0

func (m *PingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PingReq) XXX_Merge added in v0.2.0

func (dst *PingReq) XXX_Merge(src proto.Message)

func (*PingReq) XXX_Size added in v0.2.0

func (m *PingReq) XXX_Size() int

func (*PingReq) XXX_Unmarshal added in v0.2.0

func (m *PingReq) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Response) GetLatency

func (m *Response) GetLatency() int64

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown added in v0.2.0

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal added in v0.2.0

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge added in v0.2.0

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size added in v0.2.0

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal added in v0.2.0

func (m *Response) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis
Package mockgrpc is a generated GoMock package.
Package mockgrpc is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL