Documentation ¶
Index ¶
- Constants
- Variables
- func AppendProcessor(rpcProcessor IRpcProcessor)
- func GetProcessorType(param interface{}) (RpcProcessorType, IRpcProcessor)
- func ReleaseCall(call *Call)
- func ReleaseRpcRequest(rpcRequest *RpcRequest)
- func SetCompressor(cp ICompressor)
- type AddRankList
- type BaseServer
- type Call
- type CallSet
- type CallTimer
- type CallTimerHeap
- func (h *CallTimerHeap) AddTimer(seqId uint64, d time.Duration)
- func (h *CallTimerHeap) Cancel(seq uint64) bool
- func (h *CallTimerHeap) Init()
- func (h *CallTimerHeap) Len() int
- func (h *CallTimerHeap) Less(i, j int) bool
- func (h *CallTimerHeap) Pop() any
- func (h *CallTimerHeap) PopFirst() uint64
- func (h *CallTimerHeap) PopTimeout() uint64
- func (h *CallTimerHeap) Push(t any)
- func (h *CallTimerHeap) Swap(i, j int)
- type CancelRpc
- type Client
- type DBQueuePopReq
- func (*DBQueuePopReq) Descriptor() ([]byte, []int)deprecated
- func (x *DBQueuePopReq) GetCustomerId() string
- func (x *DBQueuePopReq) GetPopNum() int32
- func (x *DBQueuePopReq) GetPopStartPos() int32
- func (x *DBQueuePopReq) GetPushData() []byte
- func (x *DBQueuePopReq) GetQueueName() string
- func (*DBQueuePopReq) ProtoMessage()
- func (x *DBQueuePopReq) ProtoReflect() protoreflect.Message
- func (x *DBQueuePopReq) Reset()
- func (x *DBQueuePopReq) String() string
- type DBQueuePopRes
- func (*DBQueuePopRes) Descriptor() ([]byte, []int)deprecated
- func (x *DBQueuePopRes) GetPushData() [][]byte
- func (x *DBQueuePopRes) GetQueueName() string
- func (*DBQueuePopRes) ProtoMessage()
- func (x *DBQueuePopRes) ProtoReflect() protoreflect.Message
- func (x *DBQueuePopRes) Reset()
- func (x *DBQueuePopRes) String() string
- type DBQueuePublishReq
- func (*DBQueuePublishReq) Descriptor() ([]byte, []int)deprecated
- func (x *DBQueuePublishReq) GetPushData() [][]byte
- func (x *DBQueuePublishReq) GetTopicName() string
- func (*DBQueuePublishReq) ProtoMessage()
- func (x *DBQueuePublishReq) ProtoReflect() protoreflect.Message
- func (x *DBQueuePublishReq) Reset()
- func (x *DBQueuePublishReq) String() string
- type DBQueuePublishRes
- type DBQueueSubscribeReq
- func (*DBQueueSubscribeReq) Descriptor() ([]byte, []int)deprecated
- func (x *DBQueueSubscribeReq) GetCustomerId() string
- func (x *DBQueueSubscribeReq) GetFromNodeId() string
- func (x *DBQueueSubscribeReq) GetMethod() SubscribeMethod
- func (x *DBQueueSubscribeReq) GetOneBatchQuantity() int32
- func (x *DBQueueSubscribeReq) GetRpcMethod() string
- func (x *DBQueueSubscribeReq) GetStartIndex() uint64
- func (x *DBQueueSubscribeReq) GetSubType() SubscribeType
- func (x *DBQueueSubscribeReq) GetTopicName() string
- func (*DBQueueSubscribeReq) ProtoMessage()
- func (x *DBQueueSubscribeReq) ProtoReflect() protoreflect.Message
- func (x *DBQueueSubscribeReq) Reset()
- func (x *DBQueueSubscribeReq) String() string
- type DBQueueSubscribeRes
- type DeleteByKey
- func (*DeleteByKey) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteByKey) GetKeyList() []uint64
- func (x *DeleteByKey) GetRankId() uint64
- func (*DeleteByKey) ProtoMessage()
- func (x *DeleteByKey) ProtoReflect() protoreflect.Message
- func (x *DeleteByKey) Reset()
- func (x *DeleteByKey) String() string
- type Empty
- type ExtendIncData
- func (*ExtendIncData) Descriptor() ([]byte, []int)deprecated
- func (x *ExtendIncData) GetIncreaseValue() int64
- func (x *ExtendIncData) GetInitValue() int64
- func (*ExtendIncData) ProtoMessage()
- func (x *ExtendIncData) ProtoReflect() protoreflect.Message
- func (x *ExtendIncData) Reset()
- func (x *ExtendIncData) String() string
- type FindRankDataByKey
- func (*FindRankDataByKey) Descriptor() ([]byte, []int)deprecated
- func (x *FindRankDataByKey) GetKey() uint64
- func (x *FindRankDataByKey) GetRankId() uint64
- func (*FindRankDataByKey) ProtoMessage()
- func (x *FindRankDataByKey) ProtoReflect() protoreflect.Message
- func (x *FindRankDataByKey) Reset()
- func (x *FindRankDataByKey) String() string
- type FindRankDataByRank
- func (*FindRankDataByRank) Descriptor() ([]byte, []int)deprecated
- func (x *FindRankDataByRank) GetRank() uint64
- func (x *FindRankDataByRank) GetRankId() uint64
- func (*FindRankDataByRank) ProtoMessage()
- func (x *FindRankDataByRank) ProtoReflect() protoreflect.Message
- func (x *FindRankDataByRank) Reset()
- func (x *FindRankDataByRank) String() string
- type FindRankDataList
- func (*FindRankDataList) Descriptor() ([]byte, []int)deprecated
- func (x *FindRankDataList) GetCount() uint64
- func (x *FindRankDataList) GetKey() uint64
- func (x *FindRankDataList) GetRankId() uint64
- func (x *FindRankDataList) GetStartRank() uint64
- func (*FindRankDataList) ProtoMessage()
- func (x *FindRankDataList) ProtoReflect() protoreflect.Message
- func (x *FindRankDataList) Reset()
- func (x *FindRankDataList) String() string
- type FuncRpcClient
- type FuncRpcServer
- type ICompressor
- type IDiscoveryServiceListener
- type INatsConnListener
- type INodeConnListener
- type IRealClient
- type IRpcHandler
- type IRpcHandlerChannel
- type IRpcProcessor
- type IRpcRequestData
- type IRpcResponseData
- type IServer
- type IWriter
- type IncreaseRankData
- func (*IncreaseRankData) Descriptor() ([]byte, []int)deprecated
- func (x *IncreaseRankData) GetExtend() []*ExtendIncData
- func (x *IncreaseRankData) GetIncreaseSortData() []int64
- func (x *IncreaseRankData) GetInitData() []byte
- func (x *IncreaseRankData) GetInitSortData() []int64
- func (x *IncreaseRankData) GetInsertDataOnNonExistent() bool
- func (x *IncreaseRankData) GetKey() uint64
- func (x *IncreaseRankData) GetRankId() uint64
- func (x *IncreaseRankData) GetReturnRankData() bool
- func (x *IncreaseRankData) GetSetSortAndExtendData() []*SetSortAndExtendData
- func (*IncreaseRankData) ProtoMessage()
- func (x *IncreaseRankData) ProtoReflect() protoreflect.Message
- func (x *IncreaseRankData) Reset()
- func (x *IncreaseRankData) String() string
- type IncreaseRankDataRet
- func (*IncreaseRankDataRet) Descriptor() ([]byte, []int)deprecated
- func (x *IncreaseRankDataRet) GetPosData() *RankPosData
- func (*IncreaseRankDataRet) ProtoMessage()
- func (x *IncreaseRankDataRet) ProtoReflect() protoreflect.Message
- func (x *IncreaseRankDataRet) Reset()
- func (x *IncreaseRankDataRet) String() string
- type JsonProcessor
- func (jsonProcessor *JsonProcessor) Clone(src interface{}) (interface{}, error)
- func (jsonProcessor *JsonProcessor) GetProcessorType() RpcProcessorType
- func (jsonProcessor *JsonProcessor) IsParse(param interface{}) bool
- func (jsonProcessor *JsonProcessor) MakeRpcRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, ...) IRpcRequestData
- func (jsonProcessor *JsonProcessor) MakeRpcResponse(seq uint64, err RpcError, reply []byte) IRpcResponseData
- func (jsonProcessor *JsonProcessor) Marshal(v interface{}) ([]byte, error)
- func (jsonProcessor *JsonProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData)
- func (jsonProcessor *JsonProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData)
- func (jsonProcessor *JsonProcessor) Unmarshal(data []byte, v interface{}) error
- type JsonRpcRequestData
- func (jsonRpcRequestData *JsonRpcRequestData) GetInParam() []byte
- func (jsonRpcRequestData *JsonRpcRequestData) GetRpcMethodId() uint32
- func (jsonRpcRequestData *JsonRpcRequestData) GetSeq() uint64
- func (jsonRpcRequestData *JsonRpcRequestData) GetServiceMethod() string
- func (jsonRpcRequestData *JsonRpcRequestData) IsNoReply() bool
- type JsonRpcResponseData
- type LClient
- func (lc *LClient) AsyncCall(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, ...) (CancelRpc, error)
- func (lc *LClient) Bind(_ IServer)
- func (lc *LClient) Close(waitDone bool)
- func (lc *LClient) Go(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, noReply bool, ...) *Call
- func (lc *LClient) IsConnected() bool
- func (lc *LClient) Lock()
- func (lc *LClient) OnClose()
- func (lc *LClient) RawGo(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, ...) *Call
- func (lc *LClient) Run()
- func (lc *LClient) SetConn(conn *network.NetConn)
- func (lc *LClient) Unlock()
- type Lz4Compressor
- type NatsClient
- func (nc *NatsClient) AsyncCall(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, ...) (CancelRpc, error)
- func (nc *NatsClient) Bind(server IServer)
- func (nc *NatsClient) Close(waitDone bool)
- func (nc *NatsClient) Go(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, noReply bool, ...) *Call
- func (nc *NatsClient) IsConnected() bool
- func (nc *NatsClient) OnClose()
- func (nc *NatsClient) RawGo(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, ...) *Call
- func (nc *NatsClient) Run()
- func (nc *NatsClient) SetConn(conn *network.NetConn)
- func (nc *NatsClient) Start(natsConn *nats.Conn) error
- func (nc *NatsClient) WriteMsg(nodeId string, args ...[]byte) error
- type NatsConnEvent
- type NatsServer
- type NodeInfo
- func (*NodeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfo) GetListenAddr() string
- func (x *NodeInfo) GetMaxRpcParamLen() uint32
- func (x *NodeInfo) GetNodeId() string
- func (x *NodeInfo) GetPrivate() bool
- func (x *NodeInfo) GetPublicServiceList() []string
- func (x *NodeInfo) GetRetire() bool
- func (*NodeInfo) ProtoMessage()
- func (x *NodeInfo) ProtoReflect() protoreflect.Message
- func (x *NodeInfo) Reset()
- func (x *NodeInfo) String() string
- type NodeRetireReq
- type NotifyEventFun
- type NotifyEventToAllService
- type PBProcessor
- func (slf *PBProcessor) Clone(src interface{}) (interface{}, error)
- func (slf *PBProcessor) GetProcessorType() RpcProcessorType
- func (slf *PBProcessor) IsParse(param interface{}) bool
- func (slf *PBProcessor) MakeRpcRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, ...) IRpcRequestData
- func (slf *PBProcessor) MakeRpcResponse(seq uint64, err RpcError, reply []byte) IRpcResponseData
- func (slf *PBProcessor) Marshal(v interface{}) ([]byte, error)
- func (slf *PBProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData)
- func (slf *PBProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData)
- func (slf *PBProcessor) Unmarshal(data []byte, msg interface{}) error
- type PBRpcRequestData
- func (*PBRpcRequestData) Descriptor() ([]byte, []int)deprecated
- func (x *PBRpcRequestData) GetInParam() []byte
- func (x *PBRpcRequestData) GetNoReply() bool
- func (x *PBRpcRequestData) GetRpcMethodId() uint32
- func (x *PBRpcRequestData) GetSeq() uint64
- func (x *PBRpcRequestData) GetServiceMethod() string
- func (slf *PBRpcRequestData) IsNoReply() bool
- func (slf *PBRpcRequestData) MakeRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, ...) *PBRpcRequestData
- func (*PBRpcRequestData) ProtoMessage()
- func (x *PBRpcRequestData) ProtoReflect() protoreflect.Message
- func (x *PBRpcRequestData) Reset()
- func (x *PBRpcRequestData) String() string
- type PBRpcResponseData
- func (*PBRpcResponseData) Descriptor() ([]byte, []int)deprecated
- func (slf *PBRpcResponseData) GetErr() *RpcError
- func (x *PBRpcResponseData) GetError() string
- func (x *PBRpcResponseData) GetReply() []byte
- func (x *PBRpcResponseData) GetSeq() uint64
- func (slf *PBRpcResponseData) MakeResponse(seq uint64, err RpcError, reply []byte) *PBRpcResponseData
- func (*PBRpcResponseData) ProtoMessage()
- func (x *PBRpcResponseData) ProtoReflect() protoreflect.Message
- func (x *PBRpcResponseData) Reset()
- func (x *PBRpcResponseData) String() string
- type Ping
- type Pong
- type RClient
- func (rc *RClient) AsyncCall(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, ...) (CancelRpc, error)
- func (rc *RClient) Bind(server IServer)
- func (rc *RClient) Close(waitDone bool)
- func (rc *RClient) GetConn() *network.NetConn
- func (rc *RClient) Go(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, noReply bool, ...) *Call
- func (rc *RClient) IsConnected() bool
- func (rc *RClient) OnClose()
- func (rc *RClient) RawGo(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, ...) *Call
- func (rc *RClient) Run()
- func (rc *RClient) SetConn(conn *network.NetConn)
- func (rc *RClient) WriteMsg(nodeId string, args ...[]byte) error
- type RankData
- func (*RankData) Descriptor() ([]byte, []int)deprecated
- func (x *RankData) GetData() []byte
- func (x *RankData) GetExData() []*ExtendIncData
- func (x *RankData) GetKey() uint64
- func (x *RankData) GetSortData() []int64
- func (*RankData) ProtoMessage()
- func (x *RankData) ProtoReflect() protoreflect.Message
- func (x *RankData) Reset()
- func (x *RankData) String() string
- type RankDataList
- func (*RankDataList) Descriptor() ([]byte, []int)deprecated
- func (x *RankDataList) GetKeyRank() *RankPosData
- func (x *RankDataList) GetRankDataCount() uint64
- func (x *RankDataList) GetRankPosDataList() []*RankPosData
- func (*RankDataList) ProtoMessage()
- func (x *RankDataList) ProtoReflect() protoreflect.Message
- func (x *RankDataList) Reset()
- func (x *RankDataList) String() string
- type RankInfo
- type RankList
- func (*RankList) Descriptor() ([]byte, []int)deprecated
- func (x *RankList) GetExpireMs() int64
- func (x *RankList) GetIsDec() bool
- func (x *RankList) GetMaxRank() uint64
- func (x *RankList) GetRankId() uint64
- func (x *RankList) GetRankName() string
- func (x *RankList) GetSkipListLevel() int32
- func (*RankList) ProtoMessage()
- func (x *RankList) ProtoReflect() protoreflect.Message
- func (x *RankList) Reset()
- func (x *RankList) String() string
- type RankPosData
- func (*RankPosData) Descriptor() ([]byte, []int)deprecated
- func (x *RankPosData) GetData() []byte
- func (x *RankPosData) GetExtendData() []int64
- func (x *RankPosData) GetKey() uint64
- func (x *RankPosData) GetRank() uint64
- func (x *RankPosData) GetSortData() []int64
- func (*RankPosData) ProtoMessage()
- func (x *RankPosData) ProtoReflect() protoreflect.Message
- func (x *RankPosData) Reset()
- func (x *RankPosData) String() string
- type RankResult
- func (*RankResult) Descriptor() ([]byte, []int)deprecated
- func (x *RankResult) GetAddCount() int32
- func (x *RankResult) GetModifyCount() int32
- func (x *RankResult) GetNewRank() []*RankInfo
- func (x *RankResult) GetRemoveCount() int32
- func (*RankResult) ProtoMessage()
- func (x *RankResult) ProtoReflect() protoreflect.Message
- func (x *RankResult) Reset()
- func (x *RankResult) String() string
- type RawRpcCallBack
- type RegServiceDiscoverReq
- func (*RegServiceDiscoverReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegServiceDiscoverReq) GetNodeInfo() *NodeInfo
- func (*RegServiceDiscoverReq) ProtoMessage()
- func (x *RegServiceDiscoverReq) ProtoReflect() protoreflect.Message
- func (x *RegServiceDiscoverReq) Reset()
- func (x *RegServiceDiscoverReq) String() string
- type RequestHandler
- type Responder
- type RpcAgent
- func (agent *RpcAgent) Close()
- func (agent *RpcAgent) Destroy()
- func (agent *RpcAgent) LocalAddr() net.Addr
- func (agent *RpcAgent) OnClose()
- func (agent *RpcAgent) OnDestroy()
- func (agent *RpcAgent) RemoteAddr() net.Addr
- func (agent *RpcAgent) Run()
- func (agent *RpcAgent) WriteMsg(msg interface{})
- func (agent *RpcAgent) WriteResponse(processor IRpcProcessor, connTag string, serviceMethod string, seq uint64, ...)
- type RpcCancel
- type RpcConnEvent
- type RpcError
- type RpcHandleFinder
- type RpcHandler
- func (handler *RpcHandler) AsyncCall(serviceMethod string, args interface{}, callback interface{}) error
- func (handler *RpcHandler) AsyncCallNode(nodeId string, serviceMethod string, args interface{}, callback interface{}) error
- func (handler *RpcHandler) AsyncCallNodeWithTimeout(timeout time.Duration, nodeId string, serviceMethod string, args interface{}, ...) (CancelRpc, error)
- func (handler *RpcHandler) AsyncCallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, ...) (CancelRpc, error)
- func (handler *RpcHandler) Call(serviceMethod string, args interface{}, reply interface{}) error
- func (handler *RpcHandler) CallMethod(client *Client, ServiceMethod string, param interface{}, ...) error
- func (handler *RpcHandler) CallNode(nodeId string, serviceMethod string, args interface{}, reply interface{}) error
- func (handler *RpcHandler) CallNodeWithTimeout(timeout time.Duration, nodeId string, serviceMethod string, args interface{}, ...) error
- func (handler *RpcHandler) CallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, ...) error
- func (handler *RpcHandler) CastGo(serviceMethod string, args interface{}) error
- func (handler *RpcHandler) GetName() string
- func (handler *RpcHandler) GetRpcHandler() IRpcHandler
- func (handler *RpcHandler) GetRpcServer() FuncRpcServer
- func (handler *RpcHandler) Go(serviceMethod string, args interface{}) error
- func (handler *RpcHandler) GoNode(nodeId string, serviceMethod string, args interface{}) error
- func (handler *RpcHandler) HandlerRpcRequest(request *RpcRequest)
- func (handler *RpcHandler) HandlerRpcResponseCB(call *Call)
- func (handler *RpcHandler) InitRpcHandler(rpcHandler IRpcHandler, getClientFun FuncRpcClient, getServerFun FuncRpcServer, ...)
- func (handler *RpcHandler) RawGoNode(rpcProcessorType RpcProcessorType, nodeId string, rpcMethodId uint32, ...) error
- func (handler *RpcHandler) RegRawRpc(rpcMethodId uint32, rawRpcCB RawRpcCallBack)
- func (handler *RpcHandler) RegisterRpc(rpcHandler IRpcHandler) error
- func (handler *RpcHandler) UnmarshalInParam(rpcProcessor IRpcProcessor, serviceMethod string, rawRpcMethodId uint32, ...) (interface{}, error)
- type RpcMethodInfo
- type RpcNats
- type RpcProcessorType
- type RpcRequest
- type RpcResponse
- type Server
- type SetSortAndExtendData
- func (*SetSortAndExtendData) Descriptor() ([]byte, []int)deprecated
- func (x *SetSortAndExtendData) GetData() int64
- func (x *SetSortAndExtendData) GetIsSortData() bool
- func (x *SetSortAndExtendData) GetPos() int32
- func (*SetSortAndExtendData) ProtoMessage()
- func (x *SetSortAndExtendData) ProtoReflect() protoreflect.Message
- func (x *SetSortAndExtendData) Reset()
- func (x *SetSortAndExtendData) String() string
- type SubscribeDiscoverNotify
- func (*SubscribeDiscoverNotify) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeDiscoverNotify) GetDelNodeId() string
- func (x *SubscribeDiscoverNotify) GetIsFull() bool
- func (x *SubscribeDiscoverNotify) GetMasterNodeId() string
- func (x *SubscribeDiscoverNotify) GetNodeInfo() []*NodeInfo
- func (*SubscribeDiscoverNotify) ProtoMessage()
- func (x *SubscribeDiscoverNotify) ProtoReflect() protoreflect.Message
- func (x *SubscribeDiscoverNotify) Reset()
- func (x *SubscribeDiscoverNotify) String() string
- type SubscribeMethod
- func (SubscribeMethod) Descriptor() protoreflect.EnumDescriptor
- func (x SubscribeMethod) Enum() *SubscribeMethod
- func (SubscribeMethod) EnumDescriptor() ([]byte, []int)deprecated
- func (x SubscribeMethod) Number() protoreflect.EnumNumber
- func (x SubscribeMethod) String() string
- func (SubscribeMethod) Type() protoreflect.EnumType
- type SubscribeType
- func (SubscribeType) Descriptor() protoreflect.EnumDescriptor
- func (x SubscribeType) Enum() *SubscribeType
- func (SubscribeType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SubscribeType) Number() protoreflect.EnumNumber
- func (x SubscribeType) String() string
- func (SubscribeType) Type() protoreflect.EnumType
- type UnRegServiceDiscoverReq
- func (*UnRegServiceDiscoverReq) Descriptor() ([]byte, []int)deprecated
- func (x *UnRegServiceDiscoverReq) GetNodeId() string
- func (*UnRegServiceDiscoverReq) ProtoMessage()
- func (x *UnRegServiceDiscoverReq) ProtoReflect() protoreflect.Message
- func (x *UnRegServiceDiscoverReq) Reset()
- func (x *UnRegServiceDiscoverReq) String() string
- type UpdateRankData
- func (*UpdateRankData) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRankData) GetData() []byte
- func (x *UpdateRankData) GetKey() uint64
- func (x *UpdateRankData) GetRankId() uint64
- func (*UpdateRankData) ProtoMessage()
- func (x *UpdateRankData) ProtoReflect() protoreflect.Message
- func (x *UpdateRankData) Reset()
- func (x *UpdateRankData) String() string
- type UpdateRankDataRet
- type UpsetRankData
- func (*UpsetRankData) Descriptor() ([]byte, []int)deprecated
- func (x *UpsetRankData) GetFindNewRank() bool
- func (x *UpsetRankData) GetRankDataList() []*RankData
- func (x *UpsetRankData) GetRankId() uint64
- func (*UpsetRankData) ProtoMessage()
- func (x *UpsetRankData) ProtoReflect() protoreflect.Message
- func (x *UpsetRankData) Reset()
- func (x *UpsetRankData) String() string
Constants ¶
const ( DefaultRpcConnNum = 1 DefaultRpcLenMsgLen = 4 DefaultRpcMinMsgLen = 2 DefaultMaxCheckCallRpcCount = 1000 DefaultMaxPendingWriteNum = 1000000 DefaultConnectInterval = 2 * time.Second DefaultCheckRpcCallTimeoutInterval = 1 * time.Second DefaultRpcTimeout = 15 * time.Second )
const Default_ReadWriteDeadline = 15 * time.Second
const NodeIdNull = ""
Variables ¶
var ( SubscribeType_name = map[int32]string{ 0: "Subscribe", 1: "Unsubscribe", } SubscribeType_value = map[string]int32{ "Subscribe": 0, "Unsubscribe": 1, } )
Enum value maps for SubscribeType.
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.
var File_rpcproto_messagequeue_proto protoreflect.FileDescriptor
var File_rpcproto_origindiscover_proto protoreflect.FileDescriptor
var File_test_rpc_protorpc_proto protoreflect.FileDescriptor
var File_test_rpc_rank_proto protoreflect.FileDescriptor
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 ¶
func SetCompressor(cp ICompressor)
Types ¶
type AddRankList ¶
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
func (*AddRankList) Descriptor() ([]byte, []int)
Deprecated: Use AddRankList.ProtoReflect.Descriptor instead.
func (*AddRankList) GetAddList ¶
func (x *AddRankList) GetAddList() []*RankList
func (*AddRankList) ProtoMessage ¶
func (*AddRankList) ProtoMessage()
func (*AddRankList) ProtoReflect ¶
func (x *AddRankList) ProtoReflect() protoreflect.Message
func (*AddRankList) Reset ¶
func (x *AddRankList) Reset()
func (*AddRankList) String ¶
func (x *AddRankList) String() string
type BaseServer ¶
type BaseServer struct {
// contains filtered or unexported fields
}
type Call ¶
type CallSet ¶
type CallSet struct {
// contains filtered or unexported fields
}
func (*CallSet) AddPending ¶
func (*CallSet) FindPending ¶
func (*CallSet) RemovePending ¶
type CallTimerHeap ¶
type CallTimerHeap struct {
// contains filtered or unexported fields
}
func (*CallTimerHeap) Cancel ¶
func (h *CallTimerHeap) Cancel(seq uint64) bool
func (*CallTimerHeap) Init ¶
func (h *CallTimerHeap) Init()
func (*CallTimerHeap) Len ¶
func (h *CallTimerHeap) Len() int
func (*CallTimerHeap) Less ¶
func (h *CallTimerHeap) Less(i, j int) bool
func (*CallTimerHeap) Pop ¶
func (h *CallTimerHeap) Pop() any
func (*CallTimerHeap) PopFirst ¶
func (h *CallTimerHeap) PopFirst() uint64
func (*CallTimerHeap) PopTimeout ¶
func (h *CallTimerHeap) PopTimeout() uint64
func (*CallTimerHeap) Push ¶
func (h *CallTimerHeap) Push(t any)
func (*CallTimerHeap) Swap ¶
func (h *CallTimerHeap) Swap(i, j int)
type Client ¶
type Client struct { *CallSet IRealClient // contains filtered or unexported fields }
func NewLClient ¶
func NewRClient ¶
func (*Client) GetClientId ¶
func (*Client) GetTargetNodeId ¶
type DBQueuePopReq ¶
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
func (*DBQueuePopReq) Descriptor() ([]byte, []int)
Deprecated: Use DBQueuePopReq.ProtoReflect.Descriptor instead.
func (*DBQueuePopReq) GetCustomerId ¶
func (x *DBQueuePopReq) GetCustomerId() string
func (*DBQueuePopReq) GetPopNum ¶
func (x *DBQueuePopReq) GetPopNum() int32
func (*DBQueuePopReq) GetPopStartPos ¶
func (x *DBQueuePopReq) GetPopStartPos() int32
func (*DBQueuePopReq) GetPushData ¶
func (x *DBQueuePopReq) GetPushData() []byte
func (*DBQueuePopReq) GetQueueName ¶
func (x *DBQueuePopReq) GetQueueName() string
func (*DBQueuePopReq) ProtoMessage ¶
func (*DBQueuePopReq) ProtoMessage()
func (*DBQueuePopReq) ProtoReflect ¶
func (x *DBQueuePopReq) ProtoReflect() protoreflect.Message
func (*DBQueuePopReq) Reset ¶
func (x *DBQueuePopReq) Reset()
func (*DBQueuePopReq) String ¶
func (x *DBQueuePopReq) String() string
type DBQueuePopRes ¶
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
func (*DBQueuePopRes) Descriptor() ([]byte, []int)
Deprecated: Use DBQueuePopRes.ProtoReflect.Descriptor instead.
func (*DBQueuePopRes) GetPushData ¶
func (x *DBQueuePopRes) GetPushData() [][]byte
func (*DBQueuePopRes) GetQueueName ¶
func (x *DBQueuePopRes) GetQueueName() string
func (*DBQueuePopRes) ProtoMessage ¶
func (*DBQueuePopRes) ProtoMessage()
func (*DBQueuePopRes) ProtoReflect ¶
func (x *DBQueuePopRes) ProtoReflect() protoreflect.Message
func (*DBQueuePopRes) Reset ¶
func (x *DBQueuePopRes) Reset()
func (*DBQueuePopRes) String ¶
func (x *DBQueuePopRes) String() string
type DBQueuePublishReq ¶
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
func (*DBQueuePublishReq) Descriptor() ([]byte, []int)
Deprecated: Use DBQueuePublishReq.ProtoReflect.Descriptor instead.
func (*DBQueuePublishReq) GetPushData ¶
func (x *DBQueuePublishReq) GetPushData() [][]byte
func (*DBQueuePublishReq) GetTopicName ¶
func (x *DBQueuePublishReq) GetTopicName() string
func (*DBQueuePublishReq) ProtoMessage ¶
func (*DBQueuePublishReq) ProtoMessage()
func (*DBQueuePublishReq) ProtoReflect ¶
func (x *DBQueuePublishReq) ProtoReflect() protoreflect.Message
func (*DBQueuePublishReq) Reset ¶
func (x *DBQueuePublishReq) Reset()
func (*DBQueuePublishReq) String ¶
func (x *DBQueuePublishReq) String() string
type DBQueuePublishRes ¶
type DBQueuePublishRes struct {
// contains filtered or unexported fields
}
func (*DBQueuePublishRes) Descriptor
deprecated
func (*DBQueuePublishRes) Descriptor() ([]byte, []int)
Deprecated: Use DBQueuePublishRes.ProtoReflect.Descriptor instead.
func (*DBQueuePublishRes) ProtoMessage ¶
func (*DBQueuePublishRes) ProtoMessage()
func (*DBQueuePublishRes) ProtoReflect ¶
func (x *DBQueuePublishRes) ProtoReflect() protoreflect.Message
func (*DBQueuePublishRes) Reset ¶
func (x *DBQueuePublishRes) Reset()
func (*DBQueuePublishRes) String ¶
func (x *DBQueuePublishRes) String() string
type DBQueueSubscribeReq ¶
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 string `protobuf:"bytes,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
func (*DBQueueSubscribeReq) Descriptor() ([]byte, []int)
Deprecated: Use DBQueueSubscribeReq.ProtoReflect.Descriptor instead.
func (*DBQueueSubscribeReq) GetCustomerId ¶
func (x *DBQueueSubscribeReq) GetCustomerId() string
func (*DBQueueSubscribeReq) GetFromNodeId ¶
func (x *DBQueueSubscribeReq) GetFromNodeId() string
func (*DBQueueSubscribeReq) GetMethod ¶
func (x *DBQueueSubscribeReq) GetMethod() SubscribeMethod
func (*DBQueueSubscribeReq) GetOneBatchQuantity ¶
func (x *DBQueueSubscribeReq) GetOneBatchQuantity() int32
func (*DBQueueSubscribeReq) GetRpcMethod ¶
func (x *DBQueueSubscribeReq) GetRpcMethod() string
func (*DBQueueSubscribeReq) GetStartIndex ¶
func (x *DBQueueSubscribeReq) GetStartIndex() uint64
func (*DBQueueSubscribeReq) GetSubType ¶
func (x *DBQueueSubscribeReq) GetSubType() SubscribeType
func (*DBQueueSubscribeReq) GetTopicName ¶
func (x *DBQueueSubscribeReq) GetTopicName() string
func (*DBQueueSubscribeReq) ProtoMessage ¶
func (*DBQueueSubscribeReq) ProtoMessage()
func (*DBQueueSubscribeReq) ProtoReflect ¶
func (x *DBQueueSubscribeReq) ProtoReflect() protoreflect.Message
func (*DBQueueSubscribeReq) Reset ¶
func (x *DBQueueSubscribeReq) Reset()
func (*DBQueueSubscribeReq) String ¶
func (x *DBQueueSubscribeReq) String() string
type DBQueueSubscribeRes ¶
type DBQueueSubscribeRes struct {
// contains filtered or unexported fields
}
func (*DBQueueSubscribeRes) Descriptor
deprecated
func (*DBQueueSubscribeRes) Descriptor() ([]byte, []int)
Deprecated: Use DBQueueSubscribeRes.ProtoReflect.Descriptor instead.
func (*DBQueueSubscribeRes) ProtoMessage ¶
func (*DBQueueSubscribeRes) ProtoMessage()
func (*DBQueueSubscribeRes) ProtoReflect ¶
func (x *DBQueueSubscribeRes) ProtoReflect() protoreflect.Message
func (*DBQueueSubscribeRes) Reset ¶
func (x *DBQueueSubscribeRes) Reset()
func (*DBQueueSubscribeRes) String ¶
func (x *DBQueueSubscribeRes) String() string
type DeleteByKey ¶
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
func (*DeleteByKey) Descriptor() ([]byte, []int)
Deprecated: Use DeleteByKey.ProtoReflect.Descriptor instead.
func (*DeleteByKey) GetKeyList ¶
func (x *DeleteByKey) GetKeyList() []uint64
func (*DeleteByKey) GetRankId ¶
func (x *DeleteByKey) GetRankId() uint64
func (*DeleteByKey) ProtoMessage ¶
func (*DeleteByKey) ProtoMessage()
func (*DeleteByKey) ProtoReflect ¶
func (x *DeleteByKey) ProtoReflect() protoreflect.Message
func (*DeleteByKey) Reset ¶
func (x *DeleteByKey) Reset()
func (*DeleteByKey) String ¶
func (x *DeleteByKey) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Master->Client
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type ExtendIncData ¶
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
func (*ExtendIncData) Descriptor() ([]byte, []int)
Deprecated: Use ExtendIncData.ProtoReflect.Descriptor instead.
func (*ExtendIncData) GetIncreaseValue ¶
func (x *ExtendIncData) GetIncreaseValue() int64
func (*ExtendIncData) GetInitValue ¶
func (x *ExtendIncData) GetInitValue() int64
func (*ExtendIncData) ProtoMessage ¶
func (*ExtendIncData) ProtoMessage()
func (*ExtendIncData) ProtoReflect ¶
func (x *ExtendIncData) ProtoReflect() protoreflect.Message
func (*ExtendIncData) Reset ¶
func (x *ExtendIncData) Reset()
func (*ExtendIncData) String ¶
func (x *ExtendIncData) String() string
type FindRankDataByKey ¶
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
func (*FindRankDataByKey) Descriptor() ([]byte, []int)
Deprecated: Use FindRankDataByKey.ProtoReflect.Descriptor instead.
func (*FindRankDataByKey) GetKey ¶
func (x *FindRankDataByKey) GetKey() uint64
func (*FindRankDataByKey) GetRankId ¶
func (x *FindRankDataByKey) GetRankId() uint64
func (*FindRankDataByKey) ProtoMessage ¶
func (*FindRankDataByKey) ProtoMessage()
func (*FindRankDataByKey) ProtoReflect ¶
func (x *FindRankDataByKey) ProtoReflect() protoreflect.Message
func (*FindRankDataByKey) Reset ¶
func (x *FindRankDataByKey) Reset()
func (*FindRankDataByKey) String ¶
func (x *FindRankDataByKey) String() string
type FindRankDataByRank ¶
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
func (*FindRankDataByRank) Descriptor() ([]byte, []int)
Deprecated: Use FindRankDataByRank.ProtoReflect.Descriptor instead.
func (*FindRankDataByRank) GetRank ¶
func (x *FindRankDataByRank) GetRank() uint64
func (*FindRankDataByRank) GetRankId ¶
func (x *FindRankDataByRank) GetRankId() uint64
func (*FindRankDataByRank) ProtoMessage ¶
func (*FindRankDataByRank) ProtoMessage()
func (*FindRankDataByRank) ProtoReflect ¶
func (x *FindRankDataByRank) ProtoReflect() protoreflect.Message
func (*FindRankDataByRank) Reset ¶
func (x *FindRankDataByRank) Reset()
func (*FindRankDataByRank) String ¶
func (x *FindRankDataByRank) String() string
type FindRankDataList ¶
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
func (*FindRankDataList) Descriptor() ([]byte, []int)
Deprecated: Use FindRankDataList.ProtoReflect.Descriptor instead.
func (*FindRankDataList) GetCount ¶
func (x *FindRankDataList) GetCount() uint64
func (*FindRankDataList) GetKey ¶
func (x *FindRankDataList) GetKey() uint64
func (*FindRankDataList) GetRankId ¶
func (x *FindRankDataList) GetRankId() uint64
func (*FindRankDataList) GetStartRank ¶
func (x *FindRankDataList) GetStartRank() uint64
func (*FindRankDataList) ProtoMessage ¶
func (*FindRankDataList) ProtoMessage()
func (*FindRankDataList) ProtoReflect ¶
func (x *FindRankDataList) ProtoReflect() protoreflect.Message
func (*FindRankDataList) Reset ¶
func (x *FindRankDataList) Reset()
func (*FindRankDataList) String ¶
func (x *FindRankDataList) String() string
type FuncRpcClient ¶
type FuncRpcServer ¶
type FuncRpcServer func() IServer
type ICompressor ¶
type INatsConnListener ¶
type INatsConnListener interface { OnNatsConnected() OnNatsDisconnect() }
type INodeConnListener ¶
type IRealClient ¶
type IRealClient interface { SetConn(conn *network.NetConn) Close(waitDone bool) AsyncCall(NodeId string, timeout time.Duration, rpcHandler IRpcHandler, serviceMethod string, callback reflect.Value, args interface{}, replyParam interface{}, cancelable bool) (CancelRpc, error) Go(NodeId string, timeout time.Duration, rpcHandler IRpcHandler, noReply bool, serviceMethod string, args interface{}, reply interface{}) *Call RawGo(NodeId string, timeout time.Duration, rpcHandler IRpcHandler, processor IRpcProcessor, noReply bool, rpcMethodId uint32, serviceMethod string, rawArgs []byte, reply interface{}) *Call IsConnected() bool Run() OnClose() Bind(server IServer) }
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 string, serviceMethod string, args interface{}, reply interface{}) error AsyncCall(serviceMethod string, args interface{}, callback interface{}) error AsyncCallNode(nodeId string, serviceMethod string, args interface{}, callback interface{}) error CallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, reply interface{}) error CallNodeWithTimeout(timeout time.Duration, nodeId string, serviceMethod string, args interface{}, reply interface{}) error AsyncCallWithTimeout(timeout time.Duration, serviceMethod string, args interface{}, callback interface{}) (CancelRpc, error) AsyncCallNodeWithTimeout(timeout time.Duration, nodeId string, serviceMethod string, args interface{}, callback interface{}) (CancelRpc, error) Go(serviceMethod string, args interface{}) error GoNode(nodeId string, serviceMethod string, args interface{}) error RawGoNode(rpcProcessorType RpcProcessorType, nodeId string, rpcMethodId uint32, serviceName string, rawArgs []byte) error CastGo(serviceMethod string, args interface{}) error 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 IRpcResponseData ¶
type IServer ¶
type IServer interface { Start() error Stop() // contains filtered or unexported methods }
type IncreaseRankData ¶
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
func (*IncreaseRankData) Descriptor() ([]byte, []int)
Deprecated: Use IncreaseRankData.ProtoReflect.Descriptor instead.
func (*IncreaseRankData) GetExtend ¶
func (x *IncreaseRankData) GetExtend() []*ExtendIncData
func (*IncreaseRankData) GetIncreaseSortData ¶
func (x *IncreaseRankData) GetIncreaseSortData() []int64
func (*IncreaseRankData) GetInitData ¶
func (x *IncreaseRankData) GetInitData() []byte
func (*IncreaseRankData) GetInitSortData ¶
func (x *IncreaseRankData) GetInitSortData() []int64
func (*IncreaseRankData) GetInsertDataOnNonExistent ¶
func (x *IncreaseRankData) GetInsertDataOnNonExistent() bool
func (*IncreaseRankData) GetKey ¶
func (x *IncreaseRankData) GetKey() uint64
func (*IncreaseRankData) GetRankId ¶
func (x *IncreaseRankData) GetRankId() uint64
func (*IncreaseRankData) GetReturnRankData ¶
func (x *IncreaseRankData) GetReturnRankData() bool
func (*IncreaseRankData) GetSetSortAndExtendData ¶
func (x *IncreaseRankData) GetSetSortAndExtendData() []*SetSortAndExtendData
func (*IncreaseRankData) ProtoMessage ¶
func (*IncreaseRankData) ProtoMessage()
func (*IncreaseRankData) ProtoReflect ¶
func (x *IncreaseRankData) ProtoReflect() protoreflect.Message
func (*IncreaseRankData) Reset ¶
func (x *IncreaseRankData) Reset()
func (*IncreaseRankData) String ¶
func (x *IncreaseRankData) String() string
type IncreaseRankDataRet ¶
type IncreaseRankDataRet struct { PosData *RankPosData `protobuf:"bytes,1,opt,name=PosData,proto3" json:"PosData,omitempty"` // contains filtered or unexported fields }
func (*IncreaseRankDataRet) Descriptor
deprecated
func (*IncreaseRankDataRet) Descriptor() ([]byte, []int)
Deprecated: Use IncreaseRankDataRet.ProtoReflect.Descriptor instead.
func (*IncreaseRankDataRet) GetPosData ¶
func (x *IncreaseRankDataRet) GetPosData() *RankPosData
func (*IncreaseRankDataRet) ProtoMessage ¶
func (*IncreaseRankDataRet) ProtoMessage()
func (*IncreaseRankDataRet) ProtoReflect ¶
func (x *IncreaseRankDataRet) ProtoReflect() protoreflect.Message
func (*IncreaseRankDataRet) Reset ¶
func (x *IncreaseRankDataRet) Reset()
func (*IncreaseRankDataRet) String ¶
func (x *IncreaseRankDataRet) String() string
type JsonProcessor ¶
type JsonProcessor struct { }
func (*JsonProcessor) Clone ¶
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 ¶
type LClient struct {
// contains filtered or unexported fields
}
LClient 本结点的Client
func (*LClient) IsConnected ¶
type Lz4Compressor ¶
type Lz4Compressor struct { }
func (*Lz4Compressor) CompressBlock ¶
func (lc *Lz4Compressor) CompressBlock(src []byte) (dest []byte, err error)
func (*Lz4Compressor) CompressBufferCollection ¶
func (lc *Lz4Compressor) CompressBufferCollection(buffer []byte)
func (*Lz4Compressor) UnCompressBufferCollection ¶
func (lc *Lz4Compressor) UnCompressBufferCollection(buffer []byte)
func (*Lz4Compressor) UncompressBlock ¶
func (lc *Lz4Compressor) UncompressBlock(src []byte) (dest []byte, err error)
type NatsClient ¶
type NatsClient struct {
// contains filtered or unexported fields
}
NatsClient 跨结点连接的Client
func (*NatsClient) Bind ¶
func (nc *NatsClient) Bind(server IServer)
func (*NatsClient) Close ¶
func (nc *NatsClient) Close(waitDone bool)
func (*NatsClient) Go ¶
func (nc *NatsClient) Go(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, noReply bool, serviceMethod string, args interface{}, reply interface{}) *Call
func (*NatsClient) IsConnected ¶
func (nc *NatsClient) IsConnected() bool
func (*NatsClient) OnClose ¶
func (nc *NatsClient) OnClose()
func (*NatsClient) RawGo ¶
func (nc *NatsClient) RawGo(nodeId string, timeout time.Duration, rpcHandler IRpcHandler, processor IRpcProcessor, noReply bool, rpcMethodId uint32, serviceMethod string, rawArgs []byte, reply interface{}) *Call
func (*NatsClient) Run ¶
func (nc *NatsClient) Run()
func (*NatsClient) SetConn ¶
func (nc *NatsClient) SetConn(conn *network.NetConn)
func (*NatsClient) Start ¶
func (nc *NatsClient) Start(natsConn *nats.Conn) error
type NatsConnEvent ¶
type NatsConnEvent struct {
IsConnect bool
}
func (*NatsConnEvent) GetEventType ¶
func (nc *NatsConnEvent) GetEventType() event.EventType
type NatsServer ¶
type NatsServer struct { BaseServer NoRandomize bool // contains filtered or unexported fields }
func (*NatsServer) Start ¶
func (ns *NatsServer) Start() error
func (*NatsServer) Stop ¶
func (ns *NatsServer) Stop()
func (*NatsServer) WriteResponse ¶
func (ns *NatsServer) WriteResponse(processor IRpcProcessor, nodeId string, serviceMethod string, seq uint64, reply interface{}, rpcError RpcError)
type NodeInfo ¶
type NodeInfo struct { NodeId string `protobuf:"bytes,1,opt,name=NodeId,proto3" json:"NodeId,omitempty"` ListenAddr string `protobuf:"bytes,2,opt,name=ListenAddr,proto3" json:"ListenAddr,omitempty"` MaxRpcParamLen uint32 `protobuf:"varint,3,opt,name=MaxRpcParamLen,proto3" json:"MaxRpcParamLen,omitempty"` Private bool `protobuf:"varint,4,opt,name=Private,proto3" json:"Private,omitempty"` Retire bool `protobuf:"varint,5,opt,name=Retire,proto3" json:"Retire,omitempty"` PublicServiceList []string `protobuf:"bytes,6,rep,name=PublicServiceList,proto3" json:"PublicServiceList,omitempty"` // contains filtered or unexported fields }
func (*NodeInfo) Descriptor
deprecated
func (*NodeInfo) GetListenAddr ¶
func (*NodeInfo) GetMaxRpcParamLen ¶
func (*NodeInfo) GetPrivate ¶
func (*NodeInfo) GetPublicServiceList ¶
func (*NodeInfo) ProtoMessage ¶
func (*NodeInfo) ProtoMessage()
func (*NodeInfo) ProtoReflect ¶
func (x *NodeInfo) ProtoReflect() protoreflect.Message
type NodeRetireReq ¶
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
func (*NodeRetireReq) Descriptor() ([]byte, []int)
Deprecated: Use NodeRetireReq.ProtoReflect.Descriptor instead.
func (*NodeRetireReq) GetNodeInfo ¶
func (x *NodeRetireReq) GetNodeInfo() *NodeInfo
func (*NodeRetireReq) ProtoMessage ¶
func (*NodeRetireReq) ProtoMessage()
func (*NodeRetireReq) ProtoReflect ¶
func (x *NodeRetireReq) ProtoReflect() protoreflect.Message
func (*NodeRetireReq) Reset ¶
func (x *NodeRetireReq) Reset()
func (*NodeRetireReq) String ¶
func (x *NodeRetireReq) String() string
type NotifyEventFun ¶
type NotifyEventToAllService ¶
NotifyEventToAllService type TriggerRpcConnEvent func(bConnect bool, clientSeq uint32, nodeId string)
type PBProcessor ¶
type PBProcessor struct { }
func (*PBProcessor) Clone ¶
func (slf *PBProcessor) Clone(src interface{}) (interface{}, error)
func (*PBProcessor) GetProcessorType ¶
func (slf *PBProcessor) GetProcessorType() RpcProcessorType
func (*PBProcessor) IsParse ¶
func (slf *PBProcessor) IsParse(param interface{}) bool
func (*PBProcessor) MakeRpcRequest ¶
func (slf *PBProcessor) MakeRpcRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) IRpcRequestData
func (*PBProcessor) MakeRpcResponse ¶
func (slf *PBProcessor) MakeRpcResponse(seq uint64, err RpcError, reply []byte) IRpcResponseData
func (*PBProcessor) Marshal ¶
func (slf *PBProcessor) Marshal(v interface{}) ([]byte, error)
func (*PBProcessor) ReleaseRpcRequest ¶
func (slf *PBProcessor) ReleaseRpcRequest(rpcRequestData IRpcRequestData)
func (*PBProcessor) ReleaseRpcResponse ¶
func (slf *PBProcessor) ReleaseRpcResponse(rpcResponseData IRpcResponseData)
func (*PBProcessor) Unmarshal ¶
func (slf *PBProcessor) Unmarshal(data []byte, msg interface{}) error
type PBRpcRequestData ¶
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
func (*PBRpcRequestData) Descriptor() ([]byte, []int)
Deprecated: Use PBRpcRequestData.ProtoReflect.Descriptor instead.
func (*PBRpcRequestData) GetInParam ¶
func (x *PBRpcRequestData) GetInParam() []byte
func (*PBRpcRequestData) GetNoReply ¶
func (x *PBRpcRequestData) GetNoReply() bool
func (*PBRpcRequestData) GetRpcMethodId ¶
func (x *PBRpcRequestData) GetRpcMethodId() uint32
func (*PBRpcRequestData) GetSeq ¶
func (x *PBRpcRequestData) GetSeq() uint64
func (*PBRpcRequestData) GetServiceMethod ¶
func (x *PBRpcRequestData) GetServiceMethod() string
func (*PBRpcRequestData) IsNoReply ¶
func (slf *PBRpcRequestData) IsNoReply() bool
func (*PBRpcRequestData) MakeRequest ¶
func (slf *PBRpcRequestData) MakeRequest(seq uint64, rpcMethodId uint32, serviceMethod string, noReply bool, inParam []byte) *PBRpcRequestData
func (*PBRpcRequestData) ProtoMessage ¶
func (*PBRpcRequestData) ProtoMessage()
func (*PBRpcRequestData) ProtoReflect ¶
func (x *PBRpcRequestData) ProtoReflect() protoreflect.Message
func (*PBRpcRequestData) Reset ¶
func (x *PBRpcRequestData) Reset()
func (*PBRpcRequestData) String ¶
func (x *PBRpcRequestData) String() string
type PBRpcResponseData ¶
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
func (*PBRpcResponseData) Descriptor() ([]byte, []int)
Deprecated: Use PBRpcResponseData.ProtoReflect.Descriptor instead.
func (*PBRpcResponseData) GetErr ¶
func (slf *PBRpcResponseData) GetErr() *RpcError
func (*PBRpcResponseData) GetError ¶
func (x *PBRpcResponseData) GetError() string
func (*PBRpcResponseData) GetReply ¶
func (x *PBRpcResponseData) GetReply() []byte
func (*PBRpcResponseData) GetSeq ¶
func (x *PBRpcResponseData) GetSeq() uint64
func (*PBRpcResponseData) MakeResponse ¶
func (slf *PBRpcResponseData) MakeResponse(seq uint64, err RpcError, reply []byte) *PBRpcResponseData
func (*PBRpcResponseData) ProtoMessage ¶
func (*PBRpcResponseData) ProtoMessage()
func (*PBRpcResponseData) ProtoReflect ¶
func (x *PBRpcResponseData) ProtoReflect() protoreflect.Message
func (*PBRpcResponseData) Reset ¶
func (x *PBRpcResponseData) Reset()
func (*PBRpcResponseData) String ¶
func (x *PBRpcResponseData) String() string
type Ping ¶
type Ping struct { NodeId string `protobuf:"bytes,1,opt,name=NodeId,proto3" json:"NodeId,omitempty"` // contains filtered or unexported fields }
Client->Master
func (*Ping) Descriptor
deprecated
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) ProtoReflect ¶
func (x *Ping) ProtoReflect() protoreflect.Message
type Pong ¶
type Pong struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` // contains filtered or unexported fields }
Master->Client
func (*Pong) Descriptor
deprecated
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
func (*Pong) ProtoReflect ¶
func (x *Pong) ProtoReflect() protoreflect.Message
type RClient ¶
RClient 跨结点连接的Client
func (*RClient) IsConnected ¶
type RankData ¶
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
func (*RankData) GetExData ¶
func (x *RankData) GetExData() []*ExtendIncData
func (*RankData) GetSortData ¶
func (*RankData) ProtoMessage ¶
func (*RankData) ProtoMessage()
func (*RankData) ProtoReflect ¶
func (x *RankData) ProtoReflect() protoreflect.Message
type RankDataList ¶
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
func (*RankDataList) Descriptor() ([]byte, []int)
Deprecated: Use RankDataList.ProtoReflect.Descriptor instead.
func (*RankDataList) GetKeyRank ¶
func (x *RankDataList) GetKeyRank() *RankPosData
func (*RankDataList) GetRankDataCount ¶
func (x *RankDataList) GetRankDataCount() uint64
func (*RankDataList) GetRankPosDataList ¶
func (x *RankDataList) GetRankPosDataList() []*RankPosData
func (*RankDataList) ProtoMessage ¶
func (*RankDataList) ProtoMessage()
func (*RankDataList) ProtoReflect ¶
func (x *RankDataList) ProtoReflect() protoreflect.Message
func (*RankDataList) Reset ¶
func (x *RankDataList) Reset()
func (*RankDataList) String ¶
func (x *RankDataList) String() string
type RankInfo ¶
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
func (*RankInfo) ProtoMessage ¶
func (*RankInfo) ProtoMessage()
func (*RankInfo) ProtoReflect ¶
func (x *RankInfo) ProtoReflect() protoreflect.Message
type RankList ¶
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
func (*RankList) GetExpireMs ¶
func (*RankList) GetMaxRank ¶
func (*RankList) GetRankName ¶
func (*RankList) GetSkipListLevel ¶
func (*RankList) ProtoMessage ¶
func (*RankList) ProtoMessage()
func (*RankList) ProtoReflect ¶
func (x *RankList) ProtoReflect() protoreflect.Message
type RankPosData ¶
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
func (*RankPosData) Descriptor() ([]byte, []int)
Deprecated: Use RankPosData.ProtoReflect.Descriptor instead.
func (*RankPosData) GetData ¶
func (x *RankPosData) GetData() []byte
func (*RankPosData) GetExtendData ¶
func (x *RankPosData) GetExtendData() []int64
func (*RankPosData) GetKey ¶
func (x *RankPosData) GetKey() uint64
func (*RankPosData) GetRank ¶
func (x *RankPosData) GetRank() uint64
func (*RankPosData) GetSortData ¶
func (x *RankPosData) GetSortData() []int64
func (*RankPosData) ProtoMessage ¶
func (*RankPosData) ProtoMessage()
func (*RankPosData) ProtoReflect ¶
func (x *RankPosData) ProtoReflect() protoreflect.Message
func (*RankPosData) Reset ¶
func (x *RankPosData) Reset()
func (*RankPosData) String ¶
func (x *RankPosData) String() string
type RankResult ¶
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
func (*RankResult) Descriptor() ([]byte, []int)
Deprecated: Use RankResult.ProtoReflect.Descriptor instead.
func (*RankResult) GetAddCount ¶
func (x *RankResult) GetAddCount() int32
func (*RankResult) GetModifyCount ¶
func (x *RankResult) GetModifyCount() int32
func (*RankResult) GetNewRank ¶
func (x *RankResult) GetNewRank() []*RankInfo
func (*RankResult) GetRemoveCount ¶
func (x *RankResult) GetRemoveCount() int32
func (*RankResult) ProtoMessage ¶
func (*RankResult) ProtoMessage()
func (*RankResult) ProtoReflect ¶
func (x *RankResult) ProtoReflect() protoreflect.Message
func (*RankResult) Reset ¶
func (x *RankResult) Reset()
func (*RankResult) String ¶
func (x *RankResult) String() string
type RawRpcCallBack ¶
type RawRpcCallBack func(rawData []byte)
type RegServiceDiscoverReq ¶
type RegServiceDiscoverReq struct { NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=nodeInfo,proto3" json:"nodeInfo,omitempty"` // contains filtered or unexported fields }
Client->Master
func (*RegServiceDiscoverReq) Descriptor
deprecated
func (*RegServiceDiscoverReq) Descriptor() ([]byte, []int)
Deprecated: Use RegServiceDiscoverReq.ProtoReflect.Descriptor instead.
func (*RegServiceDiscoverReq) GetNodeInfo ¶
func (x *RegServiceDiscoverReq) GetNodeInfo() *NodeInfo
func (*RegServiceDiscoverReq) ProtoMessage ¶
func (*RegServiceDiscoverReq) ProtoMessage()
func (*RegServiceDiscoverReq) ProtoReflect ¶
func (x *RegServiceDiscoverReq) ProtoReflect() protoreflect.Message
func (*RegServiceDiscoverReq) Reset ¶
func (x *RegServiceDiscoverReq) Reset()
func (*RegServiceDiscoverReq) String ¶
func (x *RegServiceDiscoverReq) String() string
type RequestHandler ¶
type RequestHandler func(Returns interface{}, Err RpcError)
type Responder ¶
type Responder = RequestHandler
type RpcAgent ¶
type RpcAgent struct {
// contains filtered or unexported fields
}
func (*RpcAgent) RemoteAddr ¶
func (*RpcAgent) WriteResponse ¶
type RpcConnEvent ¶
RpcConnEvent Node结点连接事件
func (*RpcConnEvent) GetEventType ¶
func (rc *RpcConnEvent) GetEventType() event.EventType
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 string, serviceMethod string, args interface{}, callback interface{}) error
func (*RpcHandler) AsyncCallNodeWithTimeout ¶
func (*RpcHandler) AsyncCallWithTimeout ¶
func (*RpcHandler) Call ¶
func (handler *RpcHandler) Call(serviceMethod string, args interface{}, reply interface{}) error
func (*RpcHandler) CallMethod ¶
func (*RpcHandler) CallNode ¶
func (handler *RpcHandler) CallNode(nodeId string, serviceMethod string, args interface{}, reply interface{}) error
func (*RpcHandler) CallNodeWithTimeout ¶
func (*RpcHandler) CallWithTimeout ¶
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 ¶
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 string, 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) RawGoNode ¶
func (handler *RpcHandler) RawGoNode(rpcProcessorType RpcProcessorType, nodeId string, 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 RpcNats ¶
type RpcNats struct { NatsServer NatsClient }
func (*RpcNats) Init ¶
func (rn *RpcNats) Init(natsUrl string, noRandomize bool, nodeId string, compressBytesLen int, rpcHandleFinder RpcHandleFinder, notifyEventFun NotifyEventFun)
func (*RpcNats) NewNatsClient ¶
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 { BaseServer // contains filtered or unexported fields }
type SetSortAndExtendData ¶
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
func (*SetSortAndExtendData) Descriptor() ([]byte, []int)
Deprecated: Use SetSortAndExtendData.ProtoReflect.Descriptor instead.
func (*SetSortAndExtendData) GetData ¶
func (x *SetSortAndExtendData) GetData() int64
func (*SetSortAndExtendData) GetIsSortData ¶
func (x *SetSortAndExtendData) GetIsSortData() bool
func (*SetSortAndExtendData) GetPos ¶
func (x *SetSortAndExtendData) GetPos() int32
func (*SetSortAndExtendData) ProtoMessage ¶
func (*SetSortAndExtendData) ProtoMessage()
func (*SetSortAndExtendData) ProtoReflect ¶
func (x *SetSortAndExtendData) ProtoReflect() protoreflect.Message
func (*SetSortAndExtendData) Reset ¶
func (x *SetSortAndExtendData) Reset()
func (*SetSortAndExtendData) String ¶
func (x *SetSortAndExtendData) String() string
type SubscribeDiscoverNotify ¶
type SubscribeDiscoverNotify struct { MasterNodeId string `protobuf:"bytes,1,opt,name=MasterNodeId,proto3" json:"MasterNodeId,omitempty"` IsFull bool `protobuf:"varint,2,opt,name=IsFull,proto3" json:"IsFull,omitempty"` DelNodeId string `protobuf:"bytes,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() string
func (*SubscribeDiscoverNotify) GetIsFull ¶
func (x *SubscribeDiscoverNotify) GetIsFull() bool
func (*SubscribeDiscoverNotify) GetMasterNodeId ¶
func (x *SubscribeDiscoverNotify) GetMasterNodeId() string
func (*SubscribeDiscoverNotify) GetNodeInfo ¶
func (x *SubscribeDiscoverNotify) GetNodeInfo() []*NodeInfo
func (*SubscribeDiscoverNotify) ProtoMessage ¶
func (*SubscribeDiscoverNotify) ProtoMessage()
func (*SubscribeDiscoverNotify) ProtoReflect ¶
func (x *SubscribeDiscoverNotify) ProtoReflect() protoreflect.Message
func (*SubscribeDiscoverNotify) Reset ¶
func (x *SubscribeDiscoverNotify) Reset()
func (*SubscribeDiscoverNotify) String ¶
func (x *SubscribeDiscoverNotify) String() string
type SubscribeMethod ¶
type SubscribeMethod int32
const ( SubscribeMethod_Method_Custom SubscribeMethod = 0 //自定义模式,以消费者设置的StartIndex开始获取或订阅 SubscribeMethod_Method_Last SubscribeMethod = 1 //Last模式,以该消费者上次记录的位置开始订阅 )
func (SubscribeMethod) Descriptor ¶
func (SubscribeMethod) Descriptor() protoreflect.EnumDescriptor
func (SubscribeMethod) Enum ¶
func (x SubscribeMethod) Enum() *SubscribeMethod
func (SubscribeMethod) EnumDescriptor
deprecated
func (SubscribeMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use SubscribeMethod.Descriptor instead.
func (SubscribeMethod) Number ¶
func (x SubscribeMethod) Number() protoreflect.EnumNumber
func (SubscribeMethod) String ¶
func (x SubscribeMethod) String() string
func (SubscribeMethod) Type ¶
func (SubscribeMethod) Type() protoreflect.EnumType
type SubscribeType ¶
type SubscribeType int32
const ( SubscribeType_Subscribe SubscribeType = 0 SubscribeType_Unsubscribe SubscribeType = 1 )
func (SubscribeType) Descriptor ¶
func (SubscribeType) Descriptor() protoreflect.EnumDescriptor
func (SubscribeType) Enum ¶
func (x SubscribeType) Enum() *SubscribeType
func (SubscribeType) EnumDescriptor
deprecated
func (SubscribeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SubscribeType.Descriptor instead.
func (SubscribeType) Number ¶
func (x SubscribeType) Number() protoreflect.EnumNumber
func (SubscribeType) String ¶
func (x SubscribeType) String() string
func (SubscribeType) Type ¶
func (SubscribeType) Type() protoreflect.EnumType
type UnRegServiceDiscoverReq ¶
type UnRegServiceDiscoverReq struct { NodeId string `protobuf:"bytes,1,opt,name=NodeId,proto3" json:"NodeId,omitempty"` // contains filtered or unexported fields }
func (*UnRegServiceDiscoverReq) Descriptor
deprecated
func (*UnRegServiceDiscoverReq) Descriptor() ([]byte, []int)
Deprecated: Use UnRegServiceDiscoverReq.ProtoReflect.Descriptor instead.
func (*UnRegServiceDiscoverReq) GetNodeId ¶
func (x *UnRegServiceDiscoverReq) GetNodeId() string
func (*UnRegServiceDiscoverReq) ProtoMessage ¶
func (*UnRegServiceDiscoverReq) ProtoMessage()
func (*UnRegServiceDiscoverReq) ProtoReflect ¶
func (x *UnRegServiceDiscoverReq) ProtoReflect() protoreflect.Message
func (*UnRegServiceDiscoverReq) Reset ¶
func (x *UnRegServiceDiscoverReq) Reset()
func (*UnRegServiceDiscoverReq) String ¶
func (x *UnRegServiceDiscoverReq) String() string
type UpdateRankData ¶
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
func (*UpdateRankData) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRankData.ProtoReflect.Descriptor instead.
func (*UpdateRankData) GetData ¶
func (x *UpdateRankData) GetData() []byte
func (*UpdateRankData) GetKey ¶
func (x *UpdateRankData) GetKey() uint64
func (*UpdateRankData) GetRankId ¶
func (x *UpdateRankData) GetRankId() uint64
func (*UpdateRankData) ProtoMessage ¶
func (*UpdateRankData) ProtoMessage()
func (*UpdateRankData) ProtoReflect ¶
func (x *UpdateRankData) ProtoReflect() protoreflect.Message
func (*UpdateRankData) Reset ¶
func (x *UpdateRankData) Reset()
func (*UpdateRankData) String ¶
func (x *UpdateRankData) String() string
type UpdateRankDataRet ¶
type UpdateRankDataRet struct { Ret bool `protobuf:"varint,1,opt,name=Ret,proto3" json:"Ret,omitempty"` // contains filtered or unexported fields }
func (*UpdateRankDataRet) Descriptor
deprecated
func (*UpdateRankDataRet) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRankDataRet.ProtoReflect.Descriptor instead.
func (*UpdateRankDataRet) GetRet ¶
func (x *UpdateRankDataRet) GetRet() bool
func (*UpdateRankDataRet) ProtoMessage ¶
func (*UpdateRankDataRet) ProtoMessage()
func (*UpdateRankDataRet) ProtoReflect ¶
func (x *UpdateRankDataRet) ProtoReflect() protoreflect.Message
func (*UpdateRankDataRet) Reset ¶
func (x *UpdateRankDataRet) Reset()
func (*UpdateRankDataRet) String ¶
func (x *UpdateRankDataRet) String() string
type UpsetRankData ¶
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
func (*UpsetRankData) Descriptor() ([]byte, []int)
Deprecated: Use UpsetRankData.ProtoReflect.Descriptor instead.
func (*UpsetRankData) GetFindNewRank ¶
func (x *UpsetRankData) GetFindNewRank() bool
func (*UpsetRankData) GetRankDataList ¶
func (x *UpsetRankData) GetRankDataList() []*RankData
func (*UpsetRankData) GetRankId ¶
func (x *UpsetRankData) GetRankId() uint64
func (*UpsetRankData) ProtoMessage ¶
func (*UpsetRankData) ProtoMessage()
func (*UpsetRankData) ProtoReflect ¶
func (x *UpsetRankData) ProtoReflect() protoreflect.Message
func (*UpsetRankData) Reset ¶
func (x *UpsetRankData) Reset()
func (*UpsetRankData) String ¶
func (x *UpsetRankData) String() string