PPMQPing

package
v0.0.0-...-88f3d6a Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdID   uint64 = 19
	CmdName string = "PPMQPing"
	Module  string = "ppmqd"
)

Variables

This section is empty.

Functions

func RegisterPPRpcServer

func RegisterPPRpcServer(s *grpc.Server, srv PPRpcServer)

func RegisterService

func RegisterService(s *pprpc.Service, hook Rpcer)

RegisterService 注册服务

Types

type PPMQPingClient

type PPMQPingClient interface {
	PPCall(ctx context.Context, in *Req) (*Resp, *packets.CmdPacket, error)
}

func NewPPMQPingClient

func NewPPMQPingClient(cc pprpc.RPCCliConn) PPMQPingClient

type PPRpcClient

type PPRpcClient interface {
	PCall(ctx context.Context, in *Req, opts ...grpc.CallOption) (*Resp, error)
}

PPRpcClient is the client API for PPRpc service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPPRpcClient

func NewPPRpcClient(cc *grpc.ClientConn) PPRpcClient

type PPRpcServer

type PPRpcServer interface {
	PCall(context.Context, *Req) (*Resp, error)
}

PPRpcServer is the server API for PPRpc service.

type Req

type Req struct {
	// 添加是否是睡眠心跳: false, 不是睡眠心跳; true 是睡眠心跳. (如果是睡眠心跳需要在建立连接前发送唤醒命令)
	IsSleep              bool     `protobuf:"varint,8,opt,name=is_sleep,json=isSleep,proto3" json:"is_sleep"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Reqest

func (*Req) Descriptor

func (*Req) Descriptor() ([]byte, []int)

func (*Req) GetIsSleep

func (m *Req) GetIsSleep() bool

func (*Req) ProtoMessage

func (*Req) ProtoMessage()

func (*Req) Reset

func (m *Req) Reset()

func (*Req) String

func (m *Req) String() string

func (*Req) XXX_DiscardUnknown

func (m *Req) XXX_DiscardUnknown()

func (*Req) XXX_Marshal

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

func (*Req) XXX_Merge

func (m *Req) XXX_Merge(src proto.Message)

func (*Req) XXX_Size

func (m *Req) XXX_Size() int

func (*Req) XXX_Unmarshal

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

type Resp

type Resp struct {
	OutsideIpaddr        string   `protobuf:"bytes,1,opt,name=outside_ipaddr,json=outsideIpaddr,proto3" json:"outside_ipaddr"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response

func (*Resp) Descriptor

func (*Resp) Descriptor() ([]byte, []int)

func (*Resp) GetOutsideIpaddr

func (m *Resp) GetOutsideIpaddr() string

func (*Resp) ProtoMessage

func (*Resp) ProtoMessage()

func (*Resp) Reset

func (m *Resp) Reset()

func (*Resp) String

func (m *Resp) String() string

func (*Resp) XXX_DiscardUnknown

func (m *Resp) XXX_DiscardUnknown()

func (*Resp) XXX_Marshal

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

func (*Resp) XXX_Merge

func (m *Resp) XXX_Merge(src proto.Message)

func (*Resp) XXX_Size

func (m *Resp) XXX_Size() int

func (*Resp) XXX_Unmarshal

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

type Rpcer

type Rpcer interface {
	ReqHandle(c pprpc.RPCConn, pkg *packets.CmdPacket, req *Req) (err error)
	RespHandle(c pprpc.RPCConn, pkg *packets.CmdPacket, resp *Resp) (err error)
	DestructHandle(c pprpc.RPCConn, pkg *packets.CmdPacket, startMs int64)
}

Jump to

Keyboard shortcuts

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