rpc

package
v1.21.11 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 23 Imported by: 6

Documentation

Index

Constants

View Source
const (
	DefaultRpcConnNum           = 1
	DefaultRpcLenMsgLen         = 4
	DefaultRpcMinMsgLen         = 2
	DefaultMaxCheckCallRpcCount = 1000
	DefaultMaxPendingWriteNum   = 200000

	DefaultConnectInterval             = 2 * time.Second
	DefaultCheckRpcCallTimeoutInterval = 1 * time.Second
	DefaultRpcTimeout                  = 15 * time.Second
)
View Source
const Default_ReadWriteDeadline = 15 * time.Second

Variables

View Source
var (
	SubscribeType_name = map[int32]string{
		0: "Subscribe",
		1: "Unsubscribe",
	}
	SubscribeType_value = map[string]int32{
		"Subscribe":   0,
		"Unsubscribe": 1,
	}
)

Enum value maps for SubscribeType.

View Source
var (
	SubscribeMethod_name = map[int32]string{
		0: "Method_Custom",
		1: "Method_Last",
	}
	SubscribeMethod_value = map[string]int32{
		"Method_Custom": 0,
		"Method_Last":   1,
	}
)

Enum value maps for SubscribeMethod.

View Source
var File_proto_rpcproto_dynamicdiscover_proto protoreflect.FileDescriptor
View Source
var File_test_rpc_messagequeue_proto protoreflect.FileDescriptor
View Source
var File_test_rpc_protorpc_proto protoreflect.FileDescriptor
View Source
var File_test_rpc_rank_proto protoreflect.FileDescriptor
View Source
var LittleEndian bool

Functions

func AppendProcessor

func AppendProcessor(rpcProcessor IRpcProcessor)

func GetProcessorType

func GetProcessorType(param interface{}) (RpcProcessorType, IRpcProcessor)

func ReleaseCall

func ReleaseCall(call *Call)

func ReleaseRpcRequest

func ReleaseRpcRequest(rpcRequest *RpcRequest)

func SetCompressor added in v1.19.9

func SetCompressor(cp ICompressor)

Types

type AddRankList added in v1.19.0

type AddRankList struct {
	AddList []*RankList `protobuf:"bytes,1,rep,name=AddList,proto3" json:"AddList,omitempty"` //添加的排行榜列表
	// contains filtered or unexported fields
}

AddRankList 新增排行榜

func (*AddRankList) Descriptor deprecated added in v1.19.0

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

Deprecated: Use AddRankList.ProtoReflect.Descriptor instead.

func (*AddRankList) GetAddList added in v1.19.0

func (x *AddRankList) GetAddList() []*RankList

func (*AddRankList) ProtoMessage added in v1.19.0

func (*AddRankList) ProtoMessage()

func (*AddRankList) ProtoReflect added in v1.21.1

func (x *AddRankList) ProtoReflect() protoreflect.Message

func (*AddRankList) Reset added in v1.19.0

func (x *AddRankList) Reset()

func (*AddRankList) String added in v1.19.0

func (x *AddRankList) String() string

type Call

type Call struct {
	Seq           uint64
	ServiceMethod string
	Reply         interface{}
	Response      *RpcResponse
	Err           error

	TimeOut time.Duration
	// contains filtered or unexported fields
}

func MakeCall

func MakeCall() *Call

func (*Call) Clear

func (call *Call) Clear() *Call

func (*Call) DoError added in v1.19.6

func (call *Call) DoError(err error)

func (*Call) DoOK added in v1.19.6

func (call *Call) DoOK()

func (*Call) Done

func (call *Call) Done() *Call

func (*Call) IsRef

func (call *Call) IsRef() bool

func (*Call) Ref

func (call *Call) Ref()

func (*Call) Reset

func (call *Call) Reset()

func (*Call) UnRef

func (call *Call) UnRef()

type CallTimer added in v1.19.9

type CallTimer struct {
	SeqId    uint64
	FireTime int64
}

type CallTimerHeap added in v1.19.9

type CallTimerHeap struct {
	// contains filtered or unexported fields
}

func (*CallTimerHeap) AddTimer added in v1.19.9

func (h *CallTimerHeap) AddTimer(seqId uint64, d time.Duration)

func (*CallTimerHeap) Cancel added in v1.19.9

func (h *CallTimerHeap) Cancel(seq uint64) bool

func (*CallTimerHeap) Init added in v1.19.9

func (h *CallTimerHeap) Init()

func (*CallTimerHeap) Len added in v1.19.9

func (h *CallTimerHeap) Len() int

func (*CallTimerHeap) Less added in v1.19.9

func (h *CallTimerHeap) Less(i, j int) bool

func (*CallTimerHeap) Pop added in v1.19.9

func (h *CallTimerHeap) Pop() any

func (*CallTimerHeap) PopFirst added in v1.19.9

func (h *CallTimerHeap) PopFirst() uint64

func (*CallTimerHeap) PopTimeout added in v1.19.9

func (h *CallTimerHeap) PopTimeout() uint64

func (*CallTimerHeap) Push added in v1.19.9

func (h *CallTimerHeap) Push(t any)

func (*CallTimerHeap) Swap added in v1.19.9

func (h *CallTimerHeap) Swap(i, j int)

type CancelRpc added in v1.19.9

type CancelRpc func()

type Client

type Client struct {
	IRealClient
	// contains filtered or unexported fields
}

func NewLClient added in v1.19.3

func NewLClient(nodeId int) *Client

func NewRClient added in v1.19.3

func NewRClient(nodeId int, addr string, maxRpcParamLen uint32, compressBytesLen int, triggerRpcConnEvent TriggerRpcConnEvent) *Client

func (*Client) AddPending

func (bc *Client) AddPending(call *Call)

func (*Client) FindPending

func (bc *Client) FindPending(seq uint64) (pCall *Call)

func (*Client) GetClientId added in v1.19.3

func (client *Client) GetClientId() uint32

func (*Client) GetNodeId added in v1.19.3

func (client *Client) GetNodeId() int

func (*Client) InitPending added in v1.19.3

func (client *Client) InitPending()

func (*Client) NewClientAgent

func (client *Client) NewClientAgent(conn *network.TCPConn) network.Agent

func (*Client) RemovePending

func (bc *Client) RemovePending(seq uint64) *Call

type DBQueuePopReq added in v1.19.0

type DBQueuePopReq struct {
	CustomerId  string `protobuf:"bytes,1,opt,name=CustomerId,proto3" json:"CustomerId,omitempty"`
	QueueName   string `protobuf:"bytes,2,opt,name=QueueName,proto3" json:"QueueName,omitempty"`
	PopStartPos int32  `protobuf:"varint,3,opt,name=PopStartPos,proto3" json:"PopStartPos,omitempty"`
	PopNum      int32  `protobuf:"varint,4,opt,name=PopNum,proto3" json:"PopNum,omitempty"`
	PushData    []byte `protobuf:"bytes,5,opt,name=pushData,proto3" json:"pushData,omitempty"`
	// contains filtered or unexported fields
}

func (*DBQueuePopReq) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DBQueuePopReq.ProtoReflect.Descriptor instead.

func (*DBQueuePopReq) GetCustomerId added in v1.19.0

func (x *DBQueuePopReq) GetCustomerId() string

func (*DBQueuePopReq) GetPopNum added in v1.19.0

func (x *DBQueuePopReq) GetPopNum() int32

func (*DBQueuePopReq) GetPopStartPos added in v1.19.0

func (x *DBQueuePopReq) GetPopStartPos() int32

func (*DBQueuePopReq) GetPushData added in v1.19.0

func (x *DBQueuePopReq) GetPushData() []byte

func (*DBQueuePopReq) GetQueueName added in v1.19.0

func (x *DBQueuePopReq) GetQueueName() string

func (*DBQueuePopReq) ProtoMessage added in v1.19.0

func (*DBQueuePopReq) ProtoMessage()

func (*DBQueuePopReq) ProtoReflect added in v1.21.1

func (x *DBQueuePopReq) ProtoReflect() protoreflect.Message

func (*DBQueuePopReq) Reset added in v1.19.0

func (x *DBQueuePopReq) Reset()

func (*DBQueuePopReq) String added in v1.19.0

func (x *DBQueuePopReq) String() string

type DBQueuePopRes added in v1.19.0

type DBQueuePopRes struct {
	QueueName string   `protobuf:"bytes,1,opt,name=QueueName,proto3" json:"QueueName,omitempty"`
	PushData  [][]byte `protobuf:"bytes,2,rep,name=pushData,proto3" json:"pushData,omitempty"`
	// contains filtered or unexported fields
}

func (*DBQueuePopRes) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DBQueuePopRes.ProtoReflect.Descriptor instead.

func (*DBQueuePopRes) GetPushData added in v1.19.0

func (x *DBQueuePopRes) GetPushData() [][]byte

func (*DBQueuePopRes) GetQueueName added in v1.19.0

func (x *DBQueuePopRes) GetQueueName() string

func (*DBQueuePopRes) ProtoMessage added in v1.19.0

func (*DBQueuePopRes) ProtoMessage()

func (*DBQueuePopRes) ProtoReflect added in v1.21.1

func (x *DBQueuePopRes) ProtoReflect() protoreflect.Message

func (*DBQueuePopRes) Reset added in v1.19.0

func (x *DBQueuePopRes) Reset()

func (*DBQueuePopRes) String added in v1.19.0

func (x *DBQueuePopRes) String() string

type DBQueuePublishReq added in v1.19.0

type DBQueuePublishReq struct {
	TopicName string   `protobuf:"bytes,1,opt,name=TopicName,proto3" json:"TopicName,omitempty"` //主是,名称,数据
	PushData  [][]byte `protobuf:"bytes,2,rep,name=pushData,proto3" json:"pushData,omitempty"`
	// contains filtered or unexported fields
}

func (*DBQueuePublishReq) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DBQueuePublishReq.ProtoReflect.Descriptor instead.

func (*DBQueuePublishReq) GetPushData added in v1.19.0

func (x *DBQueuePublishReq) GetPushData() [][]byte

func (*DBQueuePublishReq) GetTopicName added in v1.19.0

func (x *DBQueuePublishReq) GetTopicName() string

func (*DBQueuePublishReq) ProtoMessage added in v1.19.0

func (*DBQueuePublishReq) ProtoMessage()

func (*DBQueuePublishReq) ProtoReflect added in v1.21.1

func (x *DBQueuePublishReq) ProtoReflect() protoreflect.Message

func (*DBQueuePublishReq) Reset added in v1.19.0

func (x *DBQueuePublishReq) Reset()

func (*DBQueuePublishReq) String added in v1.19.0

func (x *DBQueuePublishReq) String() string

type DBQueuePublishRes added in v1.19.0

type DBQueuePublishRes struct {
	// contains filtered or unexported fields
}

func (*DBQueuePublishRes) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DBQueuePublishRes.ProtoReflect.Descriptor instead.

func (*DBQueuePublishRes) ProtoMessage added in v1.19.0

func (*DBQueuePublishRes) ProtoMessage()

func (*DBQueuePublishRes) ProtoReflect added in v1.21.1

func (x *DBQueuePublishRes) ProtoReflect() protoreflect.Message

func (*DBQueuePublishRes) Reset added in v1.19.0

func (x *DBQueuePublishRes) Reset()

func (*DBQueuePublishRes) String added in v1.19.0

func (x *DBQueuePublishRes) String() string

type DBQueueSubscribeReq added in v1.19.0

type DBQueueSubscribeReq struct {
	SubType          SubscribeType   `protobuf:"varint,1,opt,name=SubType,proto3,enum=SubscribeType" json:"SubType,omitempty"` //订阅类型
	Method           SubscribeMethod `protobuf:"varint,2,opt,name=Method,proto3,enum=SubscribeMethod" json:"Method,omitempty"` //订阅方法
	CustomerId       string          `protobuf:"bytes,3,opt,name=CustomerId,proto3" json:"CustomerId,omitempty"`               //消费者Id
	FromNodeId       int32           `protobuf:"varint,4,opt,name=FromNodeId,proto3" json:"FromNodeId,omitempty"`
	RpcMethod        string          `protobuf:"bytes,5,opt,name=RpcMethod,proto3" json:"RpcMethod,omitempty"`
	TopicName        string          `protobuf:"bytes,6,opt,name=TopicName,proto3" json:"TopicName,omitempty"`                //主题名称
	StartIndex       uint64          `protobuf:"varint,7,opt,name=StartIndex,proto3" json:"StartIndex,omitempty"`             //开始位置 ,格式前4位是时间戳秒,后面是序号。如果填0时,服务自动修改成:(4bit 当前时间秒)| (0000 4bit)
	OneBatchQuantity int32           `protobuf:"varint,8,opt,name=OneBatchQuantity,proto3" json:"OneBatchQuantity,omitempty"` //订阅一次发送的数量,不设置有默认值1000条
	// contains filtered or unexported fields
}

订阅

func (*DBQueueSubscribeReq) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DBQueueSubscribeReq.ProtoReflect.Descriptor instead.

func (*DBQueueSubscribeReq) GetCustomerId added in v1.19.0

func (x *DBQueueSubscribeReq) GetCustomerId() string

func (*DBQueueSubscribeReq) GetFromNodeId added in v1.19.0

func (x *DBQueueSubscribeReq) GetFromNodeId() int32

func (*DBQueueSubscribeReq) GetMethod added in v1.19.0

func (x *DBQueueSubscribeReq) GetMethod() SubscribeMethod

func (*DBQueueSubscribeReq) GetOneBatchQuantity added in v1.19.0

func (x *DBQueueSubscribeReq) GetOneBatchQuantity() int32

func (*DBQueueSubscribeReq) GetRpcMethod added in v1.19.0

func (x *DBQueueSubscribeReq) GetRpcMethod() string

func (*DBQueueSubscribeReq) GetStartIndex added in v1.19.0

func (x *DBQueueSubscribeReq) GetStartIndex() uint64

func (*DBQueueSubscribeReq) GetSubType added in v1.19.0

func (x *DBQueueSubscribeReq) GetSubType() SubscribeType

func (*DBQueueSubscribeReq) GetTopicName added in v1.19.0

func (x *DBQueueSubscribeReq) GetTopicName() string

func (*DBQueueSubscribeReq) ProtoMessage added in v1.19.0

func (*DBQueueSubscribeReq) ProtoMessage()

func (*DBQueueSubscribeReq) ProtoReflect added in v1.21.1

func (x *DBQueueSubscribeReq) ProtoReflect() protoreflect.Message

func (*DBQueueSubscribeReq) Reset added in v1.19.0

func (x *DBQueueSubscribeReq) Reset()

func (*DBQueueSubscribeReq) String added in v1.19.0

func (x *DBQueueSubscribeReq) String() string

type DBQueueSubscribeRes added in v1.19.0

type DBQueueSubscribeRes struct {
	// contains filtered or unexported fields
}

func (*DBQueueSubscribeRes) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DBQueueSubscribeRes.ProtoReflect.Descriptor instead.

func (*DBQueueSubscribeRes) ProtoMessage added in v1.19.0

func (*DBQueueSubscribeRes) ProtoMessage()

func (*DBQueueSubscribeRes) ProtoReflect added in v1.21.1

func (x *DBQueueSubscribeRes) ProtoReflect() protoreflect.Message

func (*DBQueueSubscribeRes) Reset added in v1.19.0

func (x *DBQueueSubscribeRes) Reset()

func (*DBQueueSubscribeRes) String added in v1.19.0

func (x *DBQueueSubscribeRes) String() string

type DeleteByKey added in v1.19.0

type DeleteByKey struct {
	RankId  uint64   `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"`          //排行榜的分类ID
	KeyList []uint64 `protobuf:"varint,2,rep,packed,name=KeyList,proto3" json:"KeyList,omitempty"` //排行数据
	// contains filtered or unexported fields
}

DeleteByKey 删除排行榜数据

func (*DeleteByKey) Descriptor deprecated added in v1.19.0

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

Deprecated: Use DeleteByKey.ProtoReflect.Descriptor instead.

func (*DeleteByKey) GetKeyList added in v1.19.0

func (x *DeleteByKey) GetKeyList() []uint64

func (*DeleteByKey) GetRankId added in v1.19.0

func (x *DeleteByKey) GetRankId() uint64

func (*DeleteByKey) ProtoMessage added in v1.19.0

func (*DeleteByKey) ProtoMessage()

func (*DeleteByKey) ProtoReflect added in v1.21.1

func (x *DeleteByKey) ProtoReflect() protoreflect.Message

func (*DeleteByKey) Reset added in v1.19.0

func (x *DeleteByKey) Reset()

func (*DeleteByKey) String added in v1.19.0

func (x *DeleteByKey) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

Master->Client

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v1.21.1

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type ExtendIncData added in v1.19.3

type ExtendIncData struct {
	InitValue     int64 `protobuf:"varint,1,opt,name=InitValue,proto3" json:"InitValue,omitempty"`
	IncreaseValue int64 `protobuf:"varint,2,opt,name=IncreaseValue,proto3" json:"IncreaseValue,omitempty"`
	// contains filtered or unexported fields
}

func (*ExtendIncData) Descriptor deprecated added in v1.19.3

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

Deprecated: Use ExtendIncData.ProtoReflect.Descriptor instead.

func (*ExtendIncData) GetIncreaseValue added in v1.19.3

func (x *ExtendIncData) GetIncreaseValue() int64

func (*ExtendIncData) GetInitValue added in v1.19.3

func (x *ExtendIncData) GetInitValue() int64

func (*ExtendIncData) ProtoMessage added in v1.19.3

func (*ExtendIncData) ProtoMessage()

func (*ExtendIncData) ProtoReflect added in v1.21.1

func (x *ExtendIncData) ProtoReflect() protoreflect.Message

func (*ExtendIncData) Reset added in v1.19.3

func (x *ExtendIncData) Reset()

func (*ExtendIncData) String added in v1.19.3

func (x *ExtendIncData) String() string

type FindRankDataByKey added in v1.19.0

type FindRankDataByKey struct {
	RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID
	Key    uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"`       //排行的key
	// contains filtered or unexported fields
}

FindRankDataByKey 查找排行信息

func (*FindRankDataByKey) Descriptor deprecated added in v1.19.0

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

Deprecated: Use FindRankDataByKey.ProtoReflect.Descriptor instead.

func (*FindRankDataByKey) GetKey added in v1.19.0

func (x *FindRankDataByKey) GetKey() uint64

func (*FindRankDataByKey) GetRankId added in v1.19.0

func (x *FindRankDataByKey) GetRankId() uint64

func (*FindRankDataByKey) ProtoMessage added in v1.19.0

func (*FindRankDataByKey) ProtoMessage()

func (*FindRankDataByKey) ProtoReflect added in v1.21.1

func (x *FindRankDataByKey) ProtoReflect() protoreflect.Message

func (*FindRankDataByKey) Reset added in v1.19.0

func (x *FindRankDataByKey) Reset()

func (*FindRankDataByKey) String added in v1.19.0

func (x *FindRankDataByKey) String() string

type FindRankDataByRank added in v1.19.0

type FindRankDataByRank struct {
	RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID
	Rank   uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"`     //排行名次
	// contains filtered or unexported fields
}

FindRankDataByRank 查找排行信息

func (*FindRankDataByRank) Descriptor deprecated added in v1.19.0

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

Deprecated: Use FindRankDataByRank.ProtoReflect.Descriptor instead.

func (*FindRankDataByRank) GetRank added in v1.19.0

func (x *FindRankDataByRank) GetRank() uint64

func (*FindRankDataByRank) GetRankId added in v1.19.0

func (x *FindRankDataByRank) GetRankId() uint64

func (*FindRankDataByRank) ProtoMessage added in v1.19.0

func (*FindRankDataByRank) ProtoMessage()

func (*FindRankDataByRank) ProtoReflect added in v1.21.1

func (x *FindRankDataByRank) ProtoReflect() protoreflect.Message

func (*FindRankDataByRank) Reset added in v1.19.0

func (x *FindRankDataByRank) Reset()

func (*FindRankDataByRank) String added in v1.19.0

func (x *FindRankDataByRank) String() string

type FindRankDataList added in v1.19.0

type FindRankDataList struct {
	RankId    uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"`       //排行榜的ID
	StartRank uint64 `protobuf:"varint,2,opt,name=StartRank,proto3" json:"StartRank,omitempty"` //排行的位置 0开始
	Count     uint64 `protobuf:"varint,3,opt,name=Count,proto3" json:"Count,omitempty"`         //查询格式
	Key       uint64 `protobuf:"varint,4,opt,name=Key,proto3" json:"Key,omitempty"`             //附带一个Key查询排行信息
	// contains filtered or unexported fields
}

FindRankDataList 查找排行信息

func (*FindRankDataList) Descriptor deprecated added in v1.19.0

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

Deprecated: Use FindRankDataList.ProtoReflect.Descriptor instead.

func (*FindRankDataList) GetCount added in v1.19.0

func (x *FindRankDataList) GetCount() uint64

func (*FindRankDataList) GetKey added in v1.19.0

func (x *FindRankDataList) GetKey() uint64

func (*FindRankDataList) GetRankId added in v1.19.0

func (x *FindRankDataList) GetRankId() uint64

func (*FindRankDataList) GetStartRank added in v1.19.0

func (x *FindRankDataList) GetStartRank() uint64

func (*FindRankDataList) ProtoMessage added in v1.19.0

func (*FindRankDataList) ProtoMessage()

func (*FindRankDataList) ProtoReflect added in v1.21.1

func (x *FindRankDataList) ProtoReflect() protoreflect.Message

func (*FindRankDataList) Reset added in v1.19.0

func (x *FindRankDataList) Reset()

func (*FindRankDataList) String added in v1.19.0

func (x *FindRankDataList) String() string

type FuncRpcClient

type FuncRpcClient func(nodeId int, serviceMethod string, filterRetire bool, client []*Client) (error, int)

type FuncRpcServer

type FuncRpcServer func() *Server

type ICompressor added in v1.19.9

type ICompressor interface {
	CompressBlock(src []byte) ([]byte, error)   //dst如果有预申请使用dst内存,传入nil时内部申请
	UncompressBlock(src []byte) ([]byte, error) //dst如果有预申请使用dst内存,传入nil时内部申请

	CompressBufferCollection(buffer []byte)   //压缩的Buffer内存回收
	UnCompressBufferCollection(buffer []byte) //解压缩的Buffer内存回收
}

type IDiscoveryServiceListener added in v1.18.3

type IDiscoveryServiceListener interface {
	OnDiscoveryService(nodeId int, serviceName []string)
	OnUnDiscoveryService(nodeId int)
}

type INodeListener added in v1.18.3

type INodeListener interface {
	OnNodeConnected(nodeId int)
	OnNodeDisconnect(nodeId int)
}

type IRealClient added in v1.19.3

type IRealClient interface {
	SetConn(conn *network.TCPConn)
	Close(waitDone bool)

	AsyncCall(timeout time.Duration, rpcHandler IRpcHandler, serviceMethod string, callback reflect.Value, args interface{}, replyParam interface{}, cancelable bool) (CancelRpc, error)
	Go(timeout time.Duration, rpcHandler IRpcHandler, noReply bool, serviceMethod string, args interface{}, reply interface{}) *Call
	RawGo(timeout time.Duration, rpcHandler IRpcHandler, processor IRpcProcessor, noReply bool, rpcMethodId uint32, serviceMethod string, rawArgs []byte, reply interface{}) *Call
	IsConnected() bool

	Run()
	OnClose()
}

type IRpcHandler

type IRpcHandler interface {
	IRpcHandlerChannel
	GetName() string
	InitRpcHandler(rpcHandler IRpcHandler, getClientFun FuncRpcClient, getServerFun FuncRpcServer, rpcHandlerChannel IRpcHandlerChannel)
	GetRpcHandler() IRpcHandler
	HandlerRpcRequest(request *RpcRequest)
	HandlerRpcResponseCB(call *Call)
	CallMethod(client *Client, ServiceMethod string, param interface{}, callBack reflect.Value, reply interface{}) error

	Call(serviceMethod string, args interface{}, reply interface{}) error
	CallNode(nodeId int, serviceMethod string, args interface{}, reply interface{}) error
	AsyncCall(serviceMethod string, args interface{}, callback interface{}) error
	AsyncCallNode(nodeId int, serviceMethod string, args interface{}, callback interface{}) error

	CallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, reply interface{}) error
	CallNodeWithTimeout(timeout time.Duration, nodeId int, serviceMethod string, args interface{}, reply interface{}) error
	AsyncCallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, callback interface{}) (CancelRpc, error)
	AsyncCallNodeWithTimeout(timeout time.Duration, nodeId int, serviceMethod string, args interface{}, callback interface{}) (CancelRpc, error)

	Go(serviceMethod string, args interface{}) error
	GoNode(nodeId int, serviceMethod string, args interface{}) error
	RawGoNode(rpcProcessorType RpcProcessorType, nodeId int, rpcMethodId uint32, serviceName string, rawArgs []byte) error
	CastGo(serviceMethod string, args interface{}) error
	IsSingleCoroutine() bool
	UnmarshalInParam(rpcProcessor IRpcProcessor, serviceMethod string, rawRpcMethodId uint32, inParam []byte) (interface{}, error)
	GetRpcServer() FuncRpcServer
}

type IRpcHandlerChannel

type IRpcHandlerChannel interface {
	PushRpcResponse(call *Call) error
	PushRpcRequest(rpcRequest *RpcRequest) error
}

type IRpcProcessor

type IRpcProcessor interface {
	Clone(src interface{}) (interface{}, error)
	Marshal(v interface{}) ([]byte, error) //b表示自定义缓冲区,可以填nil,由系统自动分配
	Unmarshal(data []byte, v interface{}) error
	MakeRpcRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) IRpcRequestData
	MakeRpcResponse(seq uint64, err RpcError, reply []byte) IRpcResponseData

	ReleaseRpcRequest(rpcRequestData IRpcRequestData)
	ReleaseRpcResponse(rpcRequestData IRpcResponseData)
	IsParse(param interface{}) bool //是否可解析
	GetProcessorType() RpcProcessorType
}

func GetProcessor

func GetProcessor(processorType uint8) IRpcProcessor

type IRpcRequestData

type IRpcRequestData interface {
	GetSeq() uint64
	GetServiceMethod() string
	GetInParam() []byte
	IsNoReply() bool
	GetRpcMethodId() uint32
}

type IRpcResponseData

type IRpcResponseData interface {
	GetSeq() uint64
	GetErr() *RpcError
	GetReply() []byte
}

type IncreaseRankData added in v1.19.3

type IncreaseRankData struct {
	RankId                  uint64                  `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"`                                   //排行榜的ID
	Key                     uint64                  `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"`                                         //数据主建
	Extend                  []*ExtendIncData        `protobuf:"bytes,3,rep,name=Extend,proto3" json:"Extend,omitempty"`                                    //扩展数据
	IncreaseSortData        []int64                 `protobuf:"varint,4,rep,packed,name=IncreaseSortData,proto3" json:"IncreaseSortData,omitempty"`        //自增排行数值
	SetSortAndExtendData    []*SetSortAndExtendData `protobuf:"bytes,5,rep,name=SetSortAndExtendData,proto3" json:"SetSortAndExtendData,omitempty"`        //设置排序数据值
	ReturnRankData          bool                    `protobuf:"varint,6,opt,name=ReturnRankData,proto3" json:"ReturnRankData,omitempty"`                   //是否查找最新排名,否则不返回排行Rank字段
	InsertDataOnNonExistent bool                    `protobuf:"varint,7,opt,name=InsertDataOnNonExistent,proto3" json:"InsertDataOnNonExistent,omitempty"` //为true时:存在不进行更新,不存在则插入InitData与InitSortData数据。为false时:忽略不对InitData与InitSortData数据
	InitData                []byte                  `protobuf:"bytes,8,opt,name=InitData,proto3" json:"InitData,omitempty"`                                //不参与排行的数据
	InitSortData            []int64                 `protobuf:"varint,9,rep,packed,name=InitSortData,proto3" json:"InitSortData,omitempty"`                //参与排行的数据
	// contains filtered or unexported fields
}

自增值

func (*IncreaseRankData) Descriptor deprecated added in v1.19.3

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

Deprecated: Use IncreaseRankData.ProtoReflect.Descriptor instead.

func (*IncreaseRankData) GetExtend added in v1.19.3

func (x *IncreaseRankData) GetExtend() []*ExtendIncData

func (*IncreaseRankData) GetIncreaseSortData added in v1.19.3

func (x *IncreaseRankData) GetIncreaseSortData() []int64

func (*IncreaseRankData) GetInitData added in v1.19.3

func (x *IncreaseRankData) GetInitData() []byte

func (*IncreaseRankData) GetInitSortData added in v1.19.3

func (x *IncreaseRankData) GetInitSortData() []int64

func (*IncreaseRankData) GetInsertDataOnNonExistent added in v1.19.3

func (x *IncreaseRankData) GetInsertDataOnNonExistent() bool

func (*IncreaseRankData) GetKey added in v1.19.3

func (x *IncreaseRankData) GetKey() uint64

func (*IncreaseRankData) GetRankId added in v1.19.3

func (x *IncreaseRankData) GetRankId() uint64

func (*IncreaseRankData) GetReturnRankData added in v1.19.3

func (x *IncreaseRankData) GetReturnRankData() bool

func (*IncreaseRankData) GetSetSortAndExtendData added in v1.19.3

func (x *IncreaseRankData) GetSetSortAndExtendData() []*SetSortAndExtendData

func (*IncreaseRankData) ProtoMessage added in v1.19.3

func (*IncreaseRankData) ProtoMessage()

func (*IncreaseRankData) ProtoReflect added in v1.21.1

func (x *IncreaseRankData) ProtoReflect() protoreflect.Message

func (*IncreaseRankData) Reset added in v1.19.3

func (x *IncreaseRankData) Reset()

func (*IncreaseRankData) String added in v1.19.3

func (x *IncreaseRankData) String() string

type IncreaseRankDataRet added in v1.19.3

type IncreaseRankDataRet struct {
	PosData *RankPosData `protobuf:"bytes,1,opt,name=PosData,proto3" json:"PosData,omitempty"`
	// contains filtered or unexported fields
}

func (*IncreaseRankDataRet) Descriptor deprecated added in v1.19.3

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

Deprecated: Use IncreaseRankDataRet.ProtoReflect.Descriptor instead.

func (*IncreaseRankDataRet) GetPosData added in v1.19.3

func (x *IncreaseRankDataRet) GetPosData() *RankPosData

func (*IncreaseRankDataRet) ProtoMessage added in v1.19.3

func (*IncreaseRankDataRet) ProtoMessage()

func (*IncreaseRankDataRet) ProtoReflect added in v1.21.1

func (x *IncreaseRankDataRet) ProtoReflect() protoreflect.Message

func (*IncreaseRankDataRet) Reset added in v1.19.3

func (x *IncreaseRankDataRet) Reset()

func (*IncreaseRankDataRet) String added in v1.19.3

func (x *IncreaseRankDataRet) String() string

type JsonProcessor

type JsonProcessor struct {
}

func (*JsonProcessor) Clone added in v1.19.3

func (jsonProcessor *JsonProcessor) Clone(src interface{}) (interface{}, error)

func (*JsonProcessor) GetProcessorType

func (jsonProcessor *JsonProcessor) GetProcessorType() RpcProcessorType

func (*JsonProcessor) IsParse

func (jsonProcessor *JsonProcessor) IsParse(param interface{}) bool

func (*JsonProcessor) MakeRpcRequest

func (jsonProcessor *JsonProcessor) MakeRpcRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) IRpcRequestData

func (*JsonProcessor) MakeRpcResponse

func (jsonProcessor *JsonProcessor) MakeRpcResponse(seq uint64, err RpcError, reply []byte) IRpcResponseData

func (*JsonProcessor) Marshal

func (jsonProcessor *JsonProcessor) Marshal(v interface{}) ([]byte, error)

func (*JsonProcessor) ReleaseRpcRequest

func (jsonProcessor *JsonProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData)

func (*JsonProcessor) ReleaseRpcResponse

func (jsonProcessor *JsonProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData)

func (*JsonProcessor) Unmarshal

func (jsonProcessor *JsonProcessor) Unmarshal(data []byte, v interface{}) error

type JsonRpcRequestData

type JsonRpcRequestData struct {
	//packhead
	Seq uint64 // sequence number chosen by client

	ServiceMethod string // format: "Service.Method"
	NoReply       bool   //是否需要返回
	//packbody
	InParam []byte
	// contains filtered or unexported fields
}

func (*JsonRpcRequestData) GetInParam

func (jsonRpcRequestData *JsonRpcRequestData) GetInParam() []byte

func (*JsonRpcRequestData) GetRpcMethodId

func (jsonRpcRequestData *JsonRpcRequestData) GetRpcMethodId() uint32

func (*JsonRpcRequestData) GetSeq

func (jsonRpcRequestData *JsonRpcRequestData) GetSeq() uint64

func (*JsonRpcRequestData) GetServiceMethod

func (jsonRpcRequestData *JsonRpcRequestData) GetServiceMethod() string

func (*JsonRpcRequestData) IsNoReply

func (jsonRpcRequestData *JsonRpcRequestData) IsNoReply() bool

type JsonRpcResponseData

type JsonRpcResponseData struct {
	//head
	Seq uint64 // sequence number chosen by client
	Err string

	//returns
	Reply []byte
}

func (*JsonRpcResponseData) GetErr

func (jsonRpcResponseData *JsonRpcResponseData) GetErr() *RpcError

func (*JsonRpcResponseData) GetReply

func (jsonRpcResponseData *JsonRpcResponseData) GetReply() []byte

func (*JsonRpcResponseData) GetSeq

func (jsonRpcResponseData *JsonRpcResponseData) GetSeq() uint64

type LClient added in v1.19.3

type LClient struct {
	// contains filtered or unexported fields
}

本结点的Client

func (*LClient) AsyncCall added in v1.19.3

func (lc *LClient) AsyncCall(timeout time.Duration, rpcHandler IRpcHandler, serviceMethod string, callback reflect.Value, args interface{}, reply interface{}, cancelable bool) (CancelRpc, error)

func (*LClient) Close added in v1.19.3

func (lc *LClient) Close(waitDone bool)

func (*LClient) Go added in v1.19.3

func (lc *LClient) Go(timeout time.Duration, rpcHandler IRpcHandler, noReply bool, serviceMethod string, args interface{}, reply interface{}) *Call

func (*LClient) IsConnected added in v1.19.3

func (lc *LClient) IsConnected() bool

func (*LClient) Lock added in v1.19.3

func (rc *LClient) Lock()

func (*LClient) OnClose added in v1.19.3

func (lc *LClient) OnClose()

func (*LClient) RawGo added in v1.19.3

func (rc *LClient) RawGo(timeout time.Duration, rpcHandler IRpcHandler, processor IRpcProcessor, noReply bool, rpcMethodId uint32, serviceName string, rawArgs []byte, reply interface{}) *Call

func (*LClient) Run added in v1.19.3

func (lc *LClient) Run()

func (*LClient) SetConn added in v1.19.3

func (lc *LClient) SetConn(conn *network.TCPConn)

func (*LClient) Unlock added in v1.19.3

func (rc *LClient) Unlock()

type Lz4Compressor added in v1.19.9

type Lz4Compressor struct {
}

func (*Lz4Compressor) CompressBlock added in v1.19.9

func (lc *Lz4Compressor) CompressBlock(src []byte) (dest []byte, err error)

func (*Lz4Compressor) CompressBufferCollection added in v1.19.9

func (lc *Lz4Compressor) CompressBufferCollection(buffer []byte)

func (*Lz4Compressor) UnCompressBufferCollection added in v1.19.9

func (lc *Lz4Compressor) UnCompressBufferCollection(buffer []byte)

func (*Lz4Compressor) UncompressBlock added in v1.19.9

func (lc *Lz4Compressor) UncompressBlock(src []byte) (dest []byte, err error)

type NodeInfo

type NodeInfo struct {
	NodeId            int32    `protobuf:"varint,1,opt,name=NodeId,proto3" json:"NodeId,omitempty"`
	NodeName          string   `protobuf:"bytes,2,opt,name=NodeName,proto3" json:"NodeName,omitempty"`
	ListenAddr        string   `protobuf:"bytes,3,opt,name=ListenAddr,proto3" json:"ListenAddr,omitempty"`
	MaxRpcParamLen    uint32   `protobuf:"varint,4,opt,name=MaxRpcParamLen,proto3" json:"MaxRpcParamLen,omitempty"`
	Private           bool     `protobuf:"varint,5,opt,name=Private,proto3" json:"Private,omitempty"`
	Retire            bool     `protobuf:"varint,6,opt,name=Retire,proto3" json:"Retire,omitempty"`
	PublicServiceList []string `protobuf:"bytes,7,rep,name=PublicServiceList,proto3" json:"PublicServiceList,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeInfo) Descriptor deprecated

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

Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.

func (*NodeInfo) GetListenAddr

func (x *NodeInfo) GetListenAddr() string

func (*NodeInfo) GetMaxRpcParamLen

func (x *NodeInfo) GetMaxRpcParamLen() uint32

func (*NodeInfo) GetNodeId

func (x *NodeInfo) GetNodeId() int32

func (*NodeInfo) GetNodeName

func (x *NodeInfo) GetNodeName() string

func (*NodeInfo) GetPrivate

func (x *NodeInfo) GetPrivate() bool

func (*NodeInfo) GetPublicServiceList

func (x *NodeInfo) GetPublicServiceList() []string

func (*NodeInfo) GetRetire added in v1.21.4

func (x *NodeInfo) GetRetire() bool

func (*NodeInfo) ProtoMessage

func (*NodeInfo) ProtoMessage()

func (*NodeInfo) ProtoReflect added in v1.21.1

func (x *NodeInfo) ProtoReflect() protoreflect.Message

func (*NodeInfo) Reset

func (x *NodeInfo) Reset()

func (*NodeInfo) String

func (x *NodeInfo) String() string

type NodeRetireReq added in v1.21.4

type NodeRetireReq struct {
	NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"`
	// contains filtered or unexported fields
}

Client->Master

func (*NodeRetireReq) Descriptor deprecated added in v1.21.4

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

Deprecated: Use NodeRetireReq.ProtoReflect.Descriptor instead.

func (*NodeRetireReq) GetNodeInfo added in v1.21.4

func (x *NodeRetireReq) GetNodeInfo() *NodeInfo

func (*NodeRetireReq) ProtoMessage added in v1.21.4

func (*NodeRetireReq) ProtoMessage()

func (*NodeRetireReq) ProtoReflect added in v1.21.4

func (x *NodeRetireReq) ProtoReflect() protoreflect.Message

func (*NodeRetireReq) Reset added in v1.21.4

func (x *NodeRetireReq) Reset()

func (*NodeRetireReq) String added in v1.21.4

func (x *NodeRetireReq) String() string

type PBProcessor added in v1.21.1

type PBProcessor struct {
}

func (*PBProcessor) Clone added in v1.21.1

func (slf *PBProcessor) Clone(src interface{}) (interface{}, error)

func (*PBProcessor) GetProcessorType added in v1.21.1

func (slf *PBProcessor) GetProcessorType() RpcProcessorType

func (*PBProcessor) IsParse added in v1.21.1

func (slf *PBProcessor) IsParse(param interface{}) bool

func (*PBProcessor) MakeRpcRequest added in v1.21.1

func (slf *PBProcessor) MakeRpcRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) IRpcRequestData

func (*PBProcessor) MakeRpcResponse added in v1.21.1

func (slf *PBProcessor) MakeRpcResponse(seq uint64, err RpcError, reply []byte) IRpcResponseData

func (*PBProcessor) Marshal added in v1.21.1

func (slf *PBProcessor) Marshal(v interface{}) ([]byte, error)

func (*PBProcessor) ReleaseRpcRequest added in v1.21.1

func (slf *PBProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData)

func (*PBProcessor) ReleaseRpcResponse added in v1.21.1

func (slf *PBProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData)

func (*PBProcessor) Unmarshal added in v1.21.1

func (slf *PBProcessor) Unmarshal(data []byte, msg interface{}) error

type PBRpcRequestData added in v1.21.1

type PBRpcRequestData struct {
	Seq           uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"`
	RpcMethodId   uint32 `protobuf:"varint,2,opt,name=RpcMethodId,proto3" json:"RpcMethodId,omitempty"`
	ServiceMethod string `protobuf:"bytes,3,opt,name=ServiceMethod,proto3" json:"ServiceMethod,omitempty"`
	NoReply       bool   `protobuf:"varint,4,opt,name=NoReply,proto3" json:"NoReply,omitempty"`
	InParam       []byte `protobuf:"bytes,5,opt,name=InParam,proto3" json:"InParam,omitempty"`
	// contains filtered or unexported fields
}

func (*PBRpcRequestData) Descriptor deprecated added in v1.21.1

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

Deprecated: Use PBRpcRequestData.ProtoReflect.Descriptor instead.

func (*PBRpcRequestData) GetInParam added in v1.21.1

func (x *PBRpcRequestData) GetInParam() []byte

func (*PBRpcRequestData) GetNoReply added in v1.21.1

func (x *PBRpcRequestData) GetNoReply() bool

func (*PBRpcRequestData) GetRpcMethodId added in v1.21.1

func (x *PBRpcRequestData) GetRpcMethodId() uint32

func (*PBRpcRequestData) GetSeq added in v1.21.1

func (x *PBRpcRequestData) GetSeq() uint64

func (*PBRpcRequestData) GetServiceMethod added in v1.21.1

func (x *PBRpcRequestData) GetServiceMethod() string

func (*PBRpcRequestData) IsNoReply added in v1.21.1

func (slf *PBRpcRequestData) IsNoReply() bool

func (*PBRpcRequestData) MakeRequest added in v1.21.1

func (slf *PBRpcRequestData) MakeRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) *PBRpcRequestData

func (*PBRpcRequestData) ProtoMessage added in v1.21.1

func (*PBRpcRequestData) ProtoMessage()

func (*PBRpcRequestData) ProtoReflect added in v1.21.1

func (x *PBRpcRequestData) ProtoReflect() protoreflect.Message

func (*PBRpcRequestData) Reset added in v1.21.1

func (x *PBRpcRequestData) Reset()

func (*PBRpcRequestData) String added in v1.21.1

func (x *PBRpcRequestData) String() string

type PBRpcResponseData added in v1.21.1

type PBRpcResponseData struct {
	Seq   uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"`
	Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
	Reply []byte `protobuf:"bytes,3,opt,name=Reply,proto3" json:"Reply,omitempty"`
	// contains filtered or unexported fields
}

func (*PBRpcResponseData) Descriptor deprecated added in v1.21.1

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

Deprecated: Use PBRpcResponseData.ProtoReflect.Descriptor instead.

func (*PBRpcResponseData) GetErr added in v1.21.1

func (slf *PBRpcResponseData) GetErr() *RpcError

func (*PBRpcResponseData) GetError added in v1.21.1

func (x *PBRpcResponseData) GetError() string

func (*PBRpcResponseData) GetReply added in v1.21.1

func (x *PBRpcResponseData) GetReply() []byte

func (*PBRpcResponseData) GetSeq added in v1.21.1

func (x *PBRpcResponseData) GetSeq() uint64

func (*PBRpcResponseData) MakeRespone added in v1.21.1

func (slf *PBRpcResponseData) MakeRespone(seq uint64, err RpcError, reply []byte) *PBRpcResponseData

func (*PBRpcResponseData) ProtoMessage added in v1.21.1

func (*PBRpcResponseData) ProtoMessage()

func (*PBRpcResponseData) ProtoReflect added in v1.21.1

func (x *PBRpcResponseData) ProtoReflect() protoreflect.Message

func (*PBRpcResponseData) Reset added in v1.21.1

func (x *PBRpcResponseData) Reset()

func (*PBRpcResponseData) String added in v1.21.1

func (x *PBRpcResponseData) String() string

type RClient added in v1.19.3

type RClient struct {
	network.TCPClient

	TriggerRpcConnEvent
	// contains filtered or unexported fields
}

跨结点连接的Client

func (*RClient) AsyncCall added in v1.19.3

func (rc *RClient) AsyncCall(timeout time.Duration, rpcHandler IRpcHandler, serviceMethod string, callback reflect.Value, args interface{}, replyParam interface{}, cancelable bool) (CancelRpc, error)

func (*RClient) Close added in v1.19.3

func (rc *RClient) Close(waitDone bool)

func (*RClient) GetConn added in v1.19.3

func (rc *RClient) GetConn() *network.TCPConn

func (*RClient) Go added in v1.19.3

func (rc *RClient) Go(timeout time.Duration, rpcHandler IRpcHandler, noReply bool, serviceMethod string, args interface{}, reply interface{}) *Call

func (*RClient) IsConnected added in v1.19.3

func (rc *RClient) IsConnected() bool

func (*RClient) OnClose added in v1.19.3

func (rc *RClient) OnClose()

func (*RClient) RawGo added in v1.19.3

func (rc *RClient) RawGo(timeout time.Duration, rpcHandler IRpcHandler, processor IRpcProcessor, noReply bool, rpcMethodId uint32, serviceMethod string, rawArgs []byte, reply interface{}) *Call

func (*RClient) Run added in v1.19.3

func (rc *RClient) Run()

func (*RClient) SetConn added in v1.19.3

func (rc *RClient) SetConn(conn *network.TCPConn)

type RankData added in v1.19.0

type RankData struct {
	Key      uint64           `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"`                  //数据主建
	SortData []int64          `protobuf:"varint,2,rep,packed,name=SortData,proto3" json:"SortData,omitempty"` //参与排行的数据
	Data     []byte           `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`                 //不参与排行的数据
	ExData   []*ExtendIncData `protobuf:"bytes,4,rep,name=ExData,proto3" json:"ExData,omitempty"`             //扩展增量数据
	// contains filtered or unexported fields
}

RankData 排行数据

func (*RankData) Descriptor deprecated added in v1.19.0

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

Deprecated: Use RankData.ProtoReflect.Descriptor instead.

func (*RankData) GetData added in v1.19.0

func (x *RankData) GetData() []byte

func (*RankData) GetExData added in v1.19.3

func (x *RankData) GetExData() []*ExtendIncData

func (*RankData) GetKey added in v1.19.0

func (x *RankData) GetKey() uint64

func (*RankData) GetSortData added in v1.19.0

func (x *RankData) GetSortData() []int64

func (*RankData) ProtoMessage added in v1.19.0

func (*RankData) ProtoMessage()

func (*RankData) ProtoReflect added in v1.21.1

func (x *RankData) ProtoReflect() protoreflect.Message

func (*RankData) Reset added in v1.19.0

func (x *RankData) Reset()

func (*RankData) String added in v1.19.0

func (x *RankData) String() string

type RankDataList added in v1.19.0

type RankDataList struct {
	RankDataCount   uint64         `protobuf:"varint,1,opt,name=RankDataCount,proto3" json:"RankDataCount,omitempty"`    //排行长度
	RankPosDataList []*RankPosData `protobuf:"bytes,2,rep,name=RankPosDataList,proto3" json:"RankPosDataList,omitempty"` //排行数据
	KeyRank         *RankPosData   `protobuf:"bytes,3,opt,name=KeyRank,proto3" json:"KeyRank,omitempty"`                 //附带的Key查询排行结果信息
	// contains filtered or unexported fields
}

RankDataList

func (*RankDataList) Descriptor deprecated added in v1.19.0

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

Deprecated: Use RankDataList.ProtoReflect.Descriptor instead.

func (*RankDataList) GetKeyRank added in v1.19.0

func (x *RankDataList) GetKeyRank() *RankPosData

func (*RankDataList) GetRankDataCount added in v1.19.0

func (x *RankDataList) GetRankDataCount() uint64

func (*RankDataList) GetRankPosDataList added in v1.19.0

func (x *RankDataList) GetRankPosDataList() []*RankPosData

func (*RankDataList) ProtoMessage added in v1.19.0

func (*RankDataList) ProtoMessage()

func (*RankDataList) ProtoReflect added in v1.21.1

func (x *RankDataList) ProtoReflect() protoreflect.Message

func (*RankDataList) Reset added in v1.19.0

func (x *RankDataList) Reset()

func (*RankDataList) String added in v1.19.0

func (x *RankDataList) String() string

type RankInfo added in v1.19.3

type RankInfo struct {
	Key  uint64 `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"`
	Rank uint64 `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"`
	// contains filtered or unexported fields
}

func (*RankInfo) Descriptor deprecated added in v1.19.3

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

Deprecated: Use RankInfo.ProtoReflect.Descriptor instead.

func (*RankInfo) GetKey added in v1.19.3

func (x *RankInfo) GetKey() uint64

func (*RankInfo) GetRank added in v1.19.3

func (x *RankInfo) GetRank() uint64

func (*RankInfo) ProtoMessage added in v1.19.3

func (*RankInfo) ProtoMessage()

func (*RankInfo) ProtoReflect added in v1.21.1

func (x *RankInfo) ProtoReflect() protoreflect.Message

func (*RankInfo) Reset added in v1.19.3

func (x *RankInfo) Reset()

func (*RankInfo) String added in v1.19.3

func (x *RankInfo) String() string

type RankList added in v1.19.0

type RankList struct {
	RankId        uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"`               //排行榜类型
	RankName      string `protobuf:"bytes,2,opt,name=RankName,proto3" json:"RankName,omitempty"`            //排行榜名称
	SkipListLevel int32  `protobuf:"varint,3,opt,name=SkipListLevel,proto3" json:"SkipListLevel,omitempty"` //排行榜level-生成的跳表的level, 8/16/32/64等
	IsDec         bool   `protobuf:"varint,4,opt,name=IsDec,proto3" json:"IsDec,omitempty"`                 //不参与排行的数据
	MaxRank       uint64 `protobuf:"varint,5,opt,name=MaxRank,proto3" json:"MaxRank,omitempty"`             //最大排名
	ExpireMs      int64  `protobuf:"varint,6,opt,name=ExpireMs,proto3" json:"ExpireMs,omitempty"`           //有效时间,0永不过期
	// contains filtered or unexported fields
}

RankList 排行榜数据

func (*RankList) Descriptor deprecated added in v1.19.0

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

Deprecated: Use RankList.ProtoReflect.Descriptor instead.

func (*RankList) GetExpireMs added in v1.19.0

func (x *RankList) GetExpireMs() int64

func (*RankList) GetIsDec added in v1.19.0

func (x *RankList) GetIsDec() bool

func (*RankList) GetMaxRank added in v1.19.0

func (x *RankList) GetMaxRank() uint64

func (*RankList) GetRankId added in v1.19.0

func (x *RankList) GetRankId() uint64

func (*RankList) GetRankName added in v1.19.0

func (x *RankList) GetRankName() string

func (*RankList) GetSkipListLevel added in v1.19.0

func (x *RankList) GetSkipListLevel() int32

func (*RankList) ProtoMessage added in v1.19.0

func (*RankList) ProtoMessage()

func (*RankList) ProtoReflect added in v1.21.1

func (x *RankList) ProtoReflect() protoreflect.Message

func (*RankList) Reset added in v1.19.0

func (x *RankList) Reset()

func (*RankList) String added in v1.19.0

func (x *RankList) String() string

type RankPosData added in v1.19.0

type RankPosData struct {
	Key        uint64  `protobuf:"varint,1,opt,name=Key,proto3" json:"Key,omitempty"`                      //数据主建
	Rank       uint64  `protobuf:"varint,2,opt,name=Rank,proto3" json:"Rank,omitempty"`                    //名次
	SortData   []int64 `protobuf:"varint,3,rep,packed,name=SortData,proto3" json:"SortData,omitempty"`     //参与排行的数据
	Data       []byte  `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"`                     //不参与排行的数据
	ExtendData []int64 `protobuf:"varint,5,rep,packed,name=ExtendData,proto3" json:"ExtendData,omitempty"` //扩展数据
	// contains filtered or unexported fields
}

RankPosData 排行数据——查询返回

func (*RankPosData) Descriptor deprecated added in v1.19.0

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

Deprecated: Use RankPosData.ProtoReflect.Descriptor instead.

func (*RankPosData) GetData added in v1.19.0

func (x *RankPosData) GetData() []byte

func (*RankPosData) GetExtendData added in v1.19.3

func (x *RankPosData) GetExtendData() []int64

func (*RankPosData) GetKey added in v1.19.0

func (x *RankPosData) GetKey() uint64

func (*RankPosData) GetRank added in v1.19.0

func (x *RankPosData) GetRank() uint64

func (*RankPosData) GetSortData added in v1.19.0

func (x *RankPosData) GetSortData() []int64

func (*RankPosData) ProtoMessage added in v1.19.0

func (*RankPosData) ProtoMessage()

func (*RankPosData) ProtoReflect added in v1.21.1

func (x *RankPosData) ProtoReflect() protoreflect.Message

func (*RankPosData) Reset added in v1.19.0

func (x *RankPosData) Reset()

func (*RankPosData) String added in v1.19.0

func (x *RankPosData) String() string

type RankResult added in v1.19.0

type RankResult struct {
	AddCount    int32       `protobuf:"varint,1,opt,name=AddCount,proto3" json:"AddCount,omitempty"`       //新增数量
	ModifyCount int32       `protobuf:"varint,2,opt,name=ModifyCount,proto3" json:"ModifyCount,omitempty"` //修改数量
	RemoveCount int32       `protobuf:"varint,3,opt,name=RemoveCount,proto3" json:"RemoveCount,omitempty"` //删除数量
	NewRank     []*RankInfo `protobuf:"bytes,4,rep,name=NewRank,proto3" json:"NewRank,omitempty"`          //新的排名名次,只有UpsetRankData.FindNewRank为true时才生效
	// contains filtered or unexported fields
}

RankResult

func (*RankResult) Descriptor deprecated added in v1.19.0

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

Deprecated: Use RankResult.ProtoReflect.Descriptor instead.

func (*RankResult) GetAddCount added in v1.19.0

func (x *RankResult) GetAddCount() int32

func (*RankResult) GetModifyCount added in v1.19.0

func (x *RankResult) GetModifyCount() int32

func (*RankResult) GetNewRank added in v1.19.3

func (x *RankResult) GetNewRank() []*RankInfo

func (*RankResult) GetRemoveCount added in v1.19.0

func (x *RankResult) GetRemoveCount() int32

func (*RankResult) ProtoMessage added in v1.19.0

func (*RankResult) ProtoMessage()

func (*RankResult) ProtoReflect added in v1.21.1

func (x *RankResult) ProtoReflect() protoreflect.Message

func (*RankResult) Reset added in v1.19.0

func (x *RankResult) Reset()

func (*RankResult) String added in v1.19.0

func (x *RankResult) String() string

type RawRpcCallBack

type RawRpcCallBack func(rawData []byte)

type RequestHandler

type RequestHandler func(Returns interface{}, Err RpcError)

type Responder

type Responder = RequestHandler

func (*Responder) IsInvalid

func (r *Responder) IsInvalid() bool

type RpcAgent

type RpcAgent struct {
	// contains filtered or unexported fields
}

func (*RpcAgent) Close

func (agent *RpcAgent) Close()

func (*RpcAgent) Destroy

func (agent *RpcAgent) Destroy()

func (*RpcAgent) LocalAddr

func (agent *RpcAgent) LocalAddr() net.Addr

func (*RpcAgent) OnClose

func (agent *RpcAgent) OnClose()

func (*RpcAgent) OnDestroy

func (agent *RpcAgent) OnDestroy()

func (*RpcAgent) RemoteAddr

func (agent *RpcAgent) RemoteAddr() net.Addr

func (*RpcAgent) Run

func (agent *RpcAgent) Run()

func (*RpcAgent) WriteMsg

func (agent *RpcAgent) WriteMsg(msg interface{})

func (*RpcAgent) WriteResponse

func (agent *RpcAgent) WriteResponse(processor IRpcProcessor, serviceMethod string, seq uint64, reply interface{}, rpcError RpcError)

type RpcCancel added in v1.19.9

type RpcCancel struct {
	Cli     *Client
	CallSeq uint64
}

func (*RpcCancel) CancelRpc added in v1.19.9

func (rc *RpcCancel) CancelRpc()

type RpcError

type RpcError string
var NilError RpcError

func ConvertError

func ConvertError(e error) RpcError

func (RpcError) Error

func (e RpcError) Error() string

type RpcHandleFinder

type RpcHandleFinder interface {
	FindRpcHandler(serviceMethod string) IRpcHandler
}

type RpcHandler

type RpcHandler struct {
	IRpcHandlerChannel
	// contains filtered or unexported fields
}

func (*RpcHandler) AsyncCall

func (handler *RpcHandler) AsyncCall(serviceMethod string, args interface{}, callback interface{}) error

func (*RpcHandler) AsyncCallNode

func (handler *RpcHandler) AsyncCallNode(nodeId int, serviceMethod string, args interface{}, callback interface{}) error

func (*RpcHandler) AsyncCallNodeWithTimeout added in v1.19.9

func (handler *RpcHandler) AsyncCallNodeWithTimeout(timeout time.Duration, nodeId int, serviceMethod string, args interface{}, callback interface{}) (CancelRpc, error)

func (*RpcHandler) AsyncCallWithTimeout added in v1.19.9

func (handler *RpcHandler) AsyncCallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, callback interface{}) (CancelRpc, error)

func (*RpcHandler) Call

func (handler *RpcHandler) Call(serviceMethod string, args interface{}, reply interface{}) error

func (*RpcHandler) CallMethod

func (handler *RpcHandler) CallMethod(client *Client, ServiceMethod string, param interface{}, callBack reflect.Value, reply interface{}) error

func (*RpcHandler) CallNode

func (handler *RpcHandler) CallNode(nodeId int, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcHandler) CallNodeWithTimeout added in v1.19.9

func (handler *RpcHandler) CallNodeWithTimeout(timeout time.Duration, nodeId int, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcHandler) CallWithTimeout added in v1.19.9

func (handler *RpcHandler) CallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcHandler) CastGo

func (handler *RpcHandler) CastGo(serviceMethod string, args interface{}) error

func (*RpcHandler) GetName

func (handler *RpcHandler) GetName() string

func (*RpcHandler) GetRpcHandler

func (handler *RpcHandler) GetRpcHandler() IRpcHandler

func (*RpcHandler) GetRpcServer added in v1.19.3

func (handler *RpcHandler) GetRpcServer() FuncRpcServer

func (*RpcHandler) Go

func (handler *RpcHandler) Go(serviceMethod string, args interface{}) error

func (*RpcHandler) GoNode

func (handler *RpcHandler) GoNode(nodeId int, serviceMethod string, args interface{}) error

func (*RpcHandler) HandlerRpcRequest

func (handler *RpcHandler) HandlerRpcRequest(request *RpcRequest)

func (*RpcHandler) HandlerRpcResponseCB

func (handler *RpcHandler) HandlerRpcResponseCB(call *Call)

func (*RpcHandler) InitRpcHandler

func (handler *RpcHandler) InitRpcHandler(rpcHandler IRpcHandler, getClientFun FuncRpcClient, getServerFun FuncRpcServer, rpcHandlerChannel IRpcHandlerChannel)

func (*RpcHandler) IsSingleCoroutine

func (handler *RpcHandler) IsSingleCoroutine() bool

func (*RpcHandler) RawGoNode

func (handler *RpcHandler) RawGoNode(rpcProcessorType RpcProcessorType, nodeId int, rpcMethodId uint32, serviceName string, rawArgs []byte) error

func (*RpcHandler) RegRawRpc

func (handler *RpcHandler) RegRawRpc(rpcMethodId uint32, rawRpcCB RawRpcCallBack)

func (*RpcHandler) RegisterRpc

func (handler *RpcHandler) RegisterRpc(rpcHandler IRpcHandler) error

func (*RpcHandler) UnmarshalInParam

func (handler *RpcHandler) UnmarshalInParam(rpcProcessor IRpcProcessor, serviceMethod string, rawRpcMethodId uint32, inParam []byte) (interface{}, error)

type RpcMethodInfo

type RpcMethodInfo struct {
	// contains filtered or unexported fields
}

type RpcProcessorType

type RpcProcessorType uint8
const (
	RpcProcessorJson RpcProcessorType = 0
	RpcProcessorPB   RpcProcessorType = 1
)

type RpcRequest

type RpcRequest struct {
	RpcRequestData IRpcRequestData
	// contains filtered or unexported fields
}

func MakeRpcRequest

func MakeRpcRequest(rpcProcessor IRpcProcessor, seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) *RpcRequest

func (*RpcRequest) Clear

func (slf *RpcRequest) Clear() *RpcRequest

func (*RpcRequest) IsRef

func (slf *RpcRequest) IsRef() bool

func (*RpcRequest) Ref

func (slf *RpcRequest) Ref()

func (*RpcRequest) Reset

func (slf *RpcRequest) Reset()

func (*RpcRequest) UnRef

func (slf *RpcRequest) UnRef()

type RpcResponse

type RpcResponse struct {
	RpcResponseData IRpcResponseData
}

func (*RpcResponse) Clear

func (rpcResponse *RpcResponse) Clear() *RpcResponse

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Init

func (server *Server) Init(rpcHandleFinder RpcHandleFinder)

func (*Server) NewAgent

func (server *Server) NewAgent(c *network.TCPConn) network.Agent

func (*Server) Start

func (server *Server) Start(listenAddr string, maxRpcParamLen uint32, compressBytesLen int)

type ServiceDiscoverReq

type ServiceDiscoverReq struct {
	NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"`
	// contains filtered or unexported fields
}

Client->Master

func (*ServiceDiscoverReq) Descriptor deprecated

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

Deprecated: Use ServiceDiscoverReq.ProtoReflect.Descriptor instead.

func (*ServiceDiscoverReq) GetNodeInfo

func (x *ServiceDiscoverReq) GetNodeInfo() *NodeInfo

func (*ServiceDiscoverReq) ProtoMessage

func (*ServiceDiscoverReq) ProtoMessage()

func (*ServiceDiscoverReq) ProtoReflect added in v1.21.1

func (x *ServiceDiscoverReq) ProtoReflect() protoreflect.Message

func (*ServiceDiscoverReq) Reset

func (x *ServiceDiscoverReq) Reset()

func (*ServiceDiscoverReq) String

func (x *ServiceDiscoverReq) String() string

type SetSortAndExtendData added in v1.19.3

type SetSortAndExtendData struct {
	IsSortData bool  `protobuf:"varint,1,opt,name=IsSortData,proto3" json:"IsSortData,omitempty"` //是否为排序字段,为true时,修改Sort字段,否则修改Extend数据
	Pos        int32 `protobuf:"varint,2,opt,name=Pos,proto3" json:"Pos,omitempty"`               //排序位置
	Data       int64 `protobuf:"varint,3,opt,name=Data,proto3" json:"Data,omitempty"`             //排序值
	// contains filtered or unexported fields
}

func (*SetSortAndExtendData) Descriptor deprecated added in v1.19.3

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

Deprecated: Use SetSortAndExtendData.ProtoReflect.Descriptor instead.

func (*SetSortAndExtendData) GetData added in v1.19.3

func (x *SetSortAndExtendData) GetData() int64

func (*SetSortAndExtendData) GetIsSortData added in v1.19.3

func (x *SetSortAndExtendData) GetIsSortData() bool

func (*SetSortAndExtendData) GetPos added in v1.19.3

func (x *SetSortAndExtendData) GetPos() int32

func (*SetSortAndExtendData) ProtoMessage added in v1.19.3

func (*SetSortAndExtendData) ProtoMessage()

func (*SetSortAndExtendData) ProtoReflect added in v1.21.1

func (x *SetSortAndExtendData) ProtoReflect() protoreflect.Message

func (*SetSortAndExtendData) Reset added in v1.19.3

func (x *SetSortAndExtendData) Reset()

func (*SetSortAndExtendData) String added in v1.19.3

func (x *SetSortAndExtendData) String() string

type SubscribeDiscoverNotify

type SubscribeDiscoverNotify struct {
	MasterNodeId int32       `protobuf:"varint,1,opt,name=MasterNodeId,proto3" json:"MasterNodeId,omitempty"`
	IsFull       bool        `protobuf:"varint,2,opt,name=IsFull,proto3" json:"IsFull,omitempty"`
	DelNodeId    int32       `protobuf:"varint,3,opt,name=DelNodeId,proto3" json:"DelNodeId,omitempty"`
	NodeInfo     []*NodeInfo `protobuf:"bytes,4,rep,name=nodeInfo,proto3" json:"nodeInfo,omitempty"`
	// contains filtered or unexported fields
}

Master->Client

func (*SubscribeDiscoverNotify) Descriptor deprecated

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

Deprecated: Use SubscribeDiscoverNotify.ProtoReflect.Descriptor instead.

func (*SubscribeDiscoverNotify) GetDelNodeId

func (x *SubscribeDiscoverNotify) GetDelNodeId() int32

func (*SubscribeDiscoverNotify) GetIsFull

func (x *SubscribeDiscoverNotify) GetIsFull() bool

func (*SubscribeDiscoverNotify) GetMasterNodeId

func (x *SubscribeDiscoverNotify) GetMasterNodeId() int32

func (*SubscribeDiscoverNotify) GetNodeInfo

func (x *SubscribeDiscoverNotify) GetNodeInfo() []*NodeInfo

func (*SubscribeDiscoverNotify) ProtoMessage

func (*SubscribeDiscoverNotify) ProtoMessage()

func (*SubscribeDiscoverNotify) ProtoReflect added in v1.21.1

func (x *SubscribeDiscoverNotify) ProtoReflect() protoreflect.Message

func (*SubscribeDiscoverNotify) Reset

func (x *SubscribeDiscoverNotify) Reset()

func (*SubscribeDiscoverNotify) String

func (x *SubscribeDiscoverNotify) String() string

type SubscribeMethod added in v1.19.0

type SubscribeMethod int32
const (
	SubscribeMethod_Method_Custom SubscribeMethod = 0 //自定义模式,以消费者设置的StartIndex开始获取或订阅
	SubscribeMethod_Method_Last   SubscribeMethod = 1 //Last模式,以该消费者上次记录的位置开始订阅
)

func (SubscribeMethod) Descriptor added in v1.21.1

func (SubscribeMethod) Enum added in v1.21.1

func (x SubscribeMethod) Enum() *SubscribeMethod

func (SubscribeMethod) EnumDescriptor deprecated added in v1.19.0

func (SubscribeMethod) EnumDescriptor() ([]byte, []int)

Deprecated: Use SubscribeMethod.Descriptor instead.

func (SubscribeMethod) Number added in v1.21.1

func (SubscribeMethod) String added in v1.19.0

func (x SubscribeMethod) String() string

func (SubscribeMethod) Type added in v1.21.1

type SubscribeType added in v1.19.0

type SubscribeType int32
const (
	SubscribeType_Subscribe   SubscribeType = 0
	SubscribeType_Unsubscribe SubscribeType = 1
)

func (SubscribeType) Descriptor added in v1.21.1

func (SubscribeType) Enum added in v1.21.1

func (x SubscribeType) Enum() *SubscribeType

func (SubscribeType) EnumDescriptor deprecated added in v1.19.0

func (SubscribeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SubscribeType.Descriptor instead.

func (SubscribeType) Number added in v1.21.1

func (SubscribeType) String added in v1.19.0

func (x SubscribeType) String() string

func (SubscribeType) Type added in v1.21.1

type TriggerRpcConnEvent added in v1.19.3

type TriggerRpcConnEvent func(bConnect bool, clientSeq uint32, nodeId int)

type UpdateRankData added in v1.19.3

type UpdateRankData struct {
	RankId uint64 `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"` //排行榜的ID
	Key    uint64 `protobuf:"varint,2,opt,name=Key,proto3" json:"Key,omitempty"`       //数据主建
	Data   []byte `protobuf:"bytes,3,opt,name=Data,proto3" json:"Data,omitempty"`      //数据部分
	// contains filtered or unexported fields
}

用于单独刷新排行榜数据

func (*UpdateRankData) Descriptor deprecated added in v1.19.3

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

Deprecated: Use UpdateRankData.ProtoReflect.Descriptor instead.

func (*UpdateRankData) GetData added in v1.19.3

func (x *UpdateRankData) GetData() []byte

func (*UpdateRankData) GetKey added in v1.19.3

func (x *UpdateRankData) GetKey() uint64

func (*UpdateRankData) GetRankId added in v1.19.3

func (x *UpdateRankData) GetRankId() uint64

func (*UpdateRankData) ProtoMessage added in v1.19.3

func (*UpdateRankData) ProtoMessage()

func (*UpdateRankData) ProtoReflect added in v1.21.1

func (x *UpdateRankData) ProtoReflect() protoreflect.Message

func (*UpdateRankData) Reset added in v1.19.3

func (x *UpdateRankData) Reset()

func (*UpdateRankData) String added in v1.19.3

func (x *UpdateRankData) String() string

type UpdateRankDataRet added in v1.19.3

type UpdateRankDataRet struct {
	Ret bool `protobuf:"varint,1,opt,name=Ret,proto3" json:"Ret,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRankDataRet) Descriptor deprecated added in v1.19.3

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

Deprecated: Use UpdateRankDataRet.ProtoReflect.Descriptor instead.

func (*UpdateRankDataRet) GetRet added in v1.19.3

func (x *UpdateRankDataRet) GetRet() bool

func (*UpdateRankDataRet) ProtoMessage added in v1.19.3

func (*UpdateRankDataRet) ProtoMessage()

func (*UpdateRankDataRet) ProtoReflect added in v1.21.1

func (x *UpdateRankDataRet) ProtoReflect() protoreflect.Message

func (*UpdateRankDataRet) Reset added in v1.19.3

func (x *UpdateRankDataRet) Reset()

func (*UpdateRankDataRet) String added in v1.19.3

func (x *UpdateRankDataRet) String() string

type UpsetRankData added in v1.19.0

type UpsetRankData struct {
	RankId       uint64      `protobuf:"varint,1,opt,name=RankId,proto3" json:"RankId,omitempty"`            //排行榜的ID
	RankDataList []*RankData `protobuf:"bytes,2,rep,name=RankDataList,proto3" json:"RankDataList,omitempty"` //排行数据
	FindNewRank  bool        `protobuf:"varint,3,opt,name=FindNewRank,proto3" json:"FindNewRank,omitempty"`  //是否查找最新排名
	// contains filtered or unexported fields
}

UpsetRankData 更新排行榜数据

func (*UpsetRankData) Descriptor deprecated added in v1.19.0

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

Deprecated: Use UpsetRankData.ProtoReflect.Descriptor instead.

func (*UpsetRankData) GetFindNewRank added in v1.19.3

func (x *UpsetRankData) GetFindNewRank() bool

func (*UpsetRankData) GetRankDataList added in v1.19.0

func (x *UpsetRankData) GetRankDataList() []*RankData

func (*UpsetRankData) GetRankId added in v1.19.0

func (x *UpsetRankData) GetRankId() uint64

func (*UpsetRankData) ProtoMessage added in v1.19.0

func (*UpsetRankData) ProtoMessage()

func (*UpsetRankData) ProtoReflect added in v1.21.1

func (x *UpsetRankData) ProtoReflect() protoreflect.Message

func (*UpsetRankData) Reset added in v1.19.0

func (x *UpsetRankData) Reset()

func (*UpsetRankData) String added in v1.19.0

func (x *UpsetRankData) String() string

Jump to

Keyboard shortcuts

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