cherryProto

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 8 Imported by: 20

README

// protoc-gen-go v1.31.0 // protoc v4.24.2

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PomeloBroadcast_PushType_name = map[int32]string{
		0: "AllUID",
		1: "UID",
	}
	PomeloBroadcast_PushType_value = map[string]int32{
		"AllUID": 0,
		"UID":    1,
	}
)

Enum value maps for PomeloBroadcast_PushType.

View Source
var File_proto_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ClusterPacket added in v1.3.0

type ClusterPacket struct {
	BuildTime  int64    `protobuf:"varint,1,opt,name=buildTime,proto3" json:"buildTime,omitempty"`
	SourcePath string   `protobuf:"bytes,2,opt,name=sourcePath,proto3" json:"sourcePath,omitempty"`
	TargetPath string   `protobuf:"bytes,3,opt,name=targetPath,proto3" json:"targetPath,omitempty"`
	FuncName   string   `protobuf:"bytes,4,opt,name=funcName,proto3" json:"funcName,omitempty"`
	ArgBytes   []byte   `protobuf:"bytes,5,opt,name=argBytes,proto3" json:"argBytes,omitempty"`
	Session    *Session `protobuf:"bytes,6,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

func GetClusterPacket added in v1.3.0

func GetClusterPacket() *ClusterPacket

func (*ClusterPacket) Descriptor deprecated added in v1.3.0

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

Deprecated: Use ClusterPacket.ProtoReflect.Descriptor instead.

func (*ClusterPacket) GetArgBytes added in v1.3.0

func (x *ClusterPacket) GetArgBytes() []byte

func (*ClusterPacket) GetBuildTime added in v1.3.1

func (x *ClusterPacket) GetBuildTime() int64

func (*ClusterPacket) GetFuncName added in v1.3.0

func (x *ClusterPacket) GetFuncName() string

func (*ClusterPacket) GetSession added in v1.3.0

func (x *ClusterPacket) GetSession() *Session

func (*ClusterPacket) GetSourcePath added in v1.3.0

func (x *ClusterPacket) GetSourcePath() string

func (*ClusterPacket) GetTargetPath added in v1.3.0

func (x *ClusterPacket) GetTargetPath() string

func (*ClusterPacket) ProtoMessage added in v1.3.0

func (*ClusterPacket) ProtoMessage()

func (*ClusterPacket) ProtoReflect added in v1.3.4

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

func (*ClusterPacket) Recycle added in v1.3.0

func (x *ClusterPacket) Recycle()

func (*ClusterPacket) Reset added in v1.3.0

func (x *ClusterPacket) Reset()

func (*ClusterPacket) String added in v1.3.0

func (x *ClusterPacket) String() string

type I32 added in v1.3.0

type I32 struct {
	Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*I32) Descriptor deprecated added in v1.3.0

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

Deprecated: Use I32.ProtoReflect.Descriptor instead.

func (*I32) GetValue added in v1.3.0

func (x *I32) GetValue() int32

func (*I32) ProtoMessage added in v1.3.0

func (*I32) ProtoMessage()

func (*I32) ProtoReflect added in v1.3.4

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

func (*I32) Reset added in v1.3.0

func (x *I32) Reset()

func (*I32) String added in v1.3.0

func (x *I32) String() string

type Member

type Member struct {
	NodeID   string            `protobuf:"bytes,1,opt,name=nodeID,proto3" json:"nodeID,omitempty"`     // node id
	NodeType string            `protobuf:"bytes,2,opt,name=nodeType,proto3" json:"nodeType,omitempty"` // node type
	Address  string            `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`   // rpc ip address
	Settings map[string]string ``                                                                      // node settings data
	/* 143-byte string literal not displayed */
	LastAt           int64 `protobuf:"varint,5,opt,name=lastAt,proto3" json:"lastAt,omitempty"`                     // last check time
	HeartbeatTimeout int64 `protobuf:"varint,6,opt,name=heartbeatTimeout,proto3" json:"heartbeatTimeout,omitempty"` // The heartbeat timeout period (in milliseconds) for custom node configuration
	// contains filtered or unexported fields
}

member data

func (*Member) Descriptor deprecated

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

Deprecated: Use Member.ProtoReflect.Descriptor instead.

func (*Member) GetAddress

func (x *Member) GetAddress() string

func (*Member) GetHeartbeatTimeout added in v1.4.15

func (x *Member) GetHeartbeatTimeout() int64

func (*Member) GetLastAt added in v1.4.14

func (x *Member) GetLastAt() int64

func (*Member) GetNodeID added in v1.3.19

func (x *Member) GetNodeID() string

func (*Member) GetNodeType

func (x *Member) GetNodeType() string

func (*Member) GetSettings

func (x *Member) GetSettings() map[string]string

func (*Member) IsTimeout added in v1.4.15

func (x *Member) IsTimeout(nowMills int64) bool

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) ProtoReflect

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

func (*Member) Reset

func (x *Member) Reset()

func (*Member) String

func (x *Member) String() string

func (*Member) UpdateSetting added in v1.5.0

func (x *Member) UpdateSetting(key, value string)

func (*Member) UpdateSettings added in v1.5.0

func (x *Member) UpdateSettings(settings map[string]string)

type MemberList

type MemberList struct {
	List []*Member `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

member list data

func (*MemberList) Descriptor deprecated

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

Deprecated: Use MemberList.ProtoReflect.Descriptor instead.

func (*MemberList) GetList

func (x *MemberList) GetList() []*Member

func (*MemberList) ProtoMessage

func (*MemberList) ProtoMessage()

func (*MemberList) ProtoReflect

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

func (*MemberList) Reset

func (x *MemberList) Reset()

func (*MemberList) String

func (x *MemberList) String() string

type NodeID added in v1.4.14

type NodeID struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeID) Descriptor deprecated added in v1.4.14

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

Deprecated: Use NodeID.ProtoReflect.Descriptor instead.

func (*NodeID) GetValue added in v1.4.14

func (x *NodeID) GetValue() string

func (*NodeID) ProtoMessage added in v1.4.14

func (*NodeID) ProtoMessage()

func (*NodeID) ProtoReflect added in v1.4.14

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

func (*NodeID) Reset added in v1.4.14

func (x *NodeID) Reset()

func (*NodeID) String added in v1.4.14

func (x *NodeID) String() string

type PomeloBroadcast added in v1.4.7

type PomeloBroadcast struct {
	PushType PomeloBroadcast_PushType `protobuf:"varint,1,opt,name=pushType,proto3,enum=cherryProto.PomeloBroadcast_PushType" json:"pushType,omitempty"` // broadcast push type
	UidList  []int64                  `protobuf:"varint,2,rep,packed,name=uidList,proto3" json:"uidList,omitempty"`                                      // broadcast the uid list
	Route    string                   `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"`                                                  // push route
	Data     []byte                   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`                                                    // push data
	// contains filtered or unexported fields
}

func (*PomeloBroadcast) Descriptor deprecated added in v1.4.7

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

Deprecated: Use PomeloBroadcast.ProtoReflect.Descriptor instead.

func (*PomeloBroadcast) GetData added in v1.4.7

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

func (*PomeloBroadcast) GetPushType added in v1.4.7

func (x *PomeloBroadcast) GetPushType() PomeloBroadcast_PushType

func (*PomeloBroadcast) GetRoute added in v1.4.7

func (x *PomeloBroadcast) GetRoute() string

func (*PomeloBroadcast) GetUidList added in v1.4.7

func (x *PomeloBroadcast) GetUidList() []int64

func (*PomeloBroadcast) ProtoMessage added in v1.4.7

func (*PomeloBroadcast) ProtoMessage()

func (*PomeloBroadcast) ProtoReflect added in v1.4.7

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

func (*PomeloBroadcast) Reset added in v1.4.7

func (x *PomeloBroadcast) Reset()

func (*PomeloBroadcast) String added in v1.4.7

func (x *PomeloBroadcast) String() string

type PomeloBroadcast_PushType added in v1.4.7

type PomeloBroadcast_PushType int32
const (
	PomeloBroadcast_AllUID PomeloBroadcast_PushType = 0 // all agent with uid
	PomeloBroadcast_UID    PomeloBroadcast_PushType = 1 // uidList
)

func (PomeloBroadcast_PushType) Descriptor added in v1.4.7

func (PomeloBroadcast_PushType) Enum added in v1.4.7

func (PomeloBroadcast_PushType) EnumDescriptor deprecated added in v1.4.7

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

Deprecated: Use PomeloBroadcast_PushType.Descriptor instead.

func (PomeloBroadcast_PushType) Number added in v1.4.7

func (PomeloBroadcast_PushType) String added in v1.4.7

func (x PomeloBroadcast_PushType) String() string

func (PomeloBroadcast_PushType) Type added in v1.4.7

type PomeloKick added in v1.3.0

type PomeloKick struct {
	Sid    string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
	Uid    int64  `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Reason []byte `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
	Close  bool   `protobuf:"varint,4,opt,name=close,proto3" json:"close,omitempty"`
	// contains filtered or unexported fields
}

func (*PomeloKick) Descriptor deprecated added in v1.3.0

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

Deprecated: Use PomeloKick.ProtoReflect.Descriptor instead.

func (*PomeloKick) GetClose added in v1.3.0

func (x *PomeloKick) GetClose() bool

func (*PomeloKick) GetReason added in v1.3.0

func (x *PomeloKick) GetReason() []byte

func (*PomeloKick) GetSid added in v1.3.0

func (x *PomeloKick) GetSid() string

func (*PomeloKick) GetUid added in v1.3.0

func (x *PomeloKick) GetUid() int64

func (*PomeloKick) ProtoMessage added in v1.3.0

func (*PomeloKick) ProtoMessage()

func (*PomeloKick) ProtoReflect added in v1.3.4

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

func (*PomeloKick) Reset added in v1.3.0

func (x *PomeloKick) Reset()

func (*PomeloKick) String added in v1.3.0

func (x *PomeloKick) String() string

type PomeloPush added in v1.3.0

type PomeloPush struct {
	Sid   string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
	Uid   int64  `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
	Route string `protobuf:"bytes,3,opt,name=route,proto3" json:"route,omitempty"`
	Data  []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PomeloPush) Descriptor deprecated added in v1.3.0

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

Deprecated: Use PomeloPush.ProtoReflect.Descriptor instead.

func (*PomeloPush) GetData added in v1.3.0

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

func (*PomeloPush) GetRoute added in v1.3.0

func (x *PomeloPush) GetRoute() string

func (*PomeloPush) GetSid added in v1.3.0

func (x *PomeloPush) GetSid() string

func (*PomeloPush) GetUid added in v1.4.3

func (x *PomeloPush) GetUid() int64

func (*PomeloPush) ProtoMessage added in v1.3.0

func (*PomeloPush) ProtoMessage()

func (*PomeloPush) ProtoReflect added in v1.3.4

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

func (*PomeloPush) Reset added in v1.3.0

func (x *PomeloPush) Reset()

func (*PomeloPush) String added in v1.3.0

func (x *PomeloPush) String() string

type PomeloResponse added in v1.3.0

type PomeloResponse struct {
	Sid  string `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`
	Mid  uint32 `protobuf:"varint,2,opt,name=mid,proto3" json:"mid,omitempty"` // message id build by client
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Code int32  `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*PomeloResponse) Descriptor deprecated added in v1.3.0

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

Deprecated: Use PomeloResponse.ProtoReflect.Descriptor instead.

func (*PomeloResponse) GetCode added in v1.3.0

func (x *PomeloResponse) GetCode() int32

func (*PomeloResponse) GetData added in v1.3.0

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

func (*PomeloResponse) GetMid added in v1.3.0

func (x *PomeloResponse) GetMid() uint32

func (*PomeloResponse) GetSid added in v1.3.0

func (x *PomeloResponse) GetSid() string

func (*PomeloResponse) ProtoMessage added in v1.3.0

func (*PomeloResponse) ProtoMessage()

func (*PomeloResponse) ProtoReflect added in v1.3.4

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

func (*PomeloResponse) Reset added in v1.3.0

func (x *PomeloResponse) Reset()

func (*PomeloResponse) String added in v1.3.0

func (x *PomeloResponse) String() string

type Response

type Response struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // message code
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`  // message data
	// contains filtered or unexported fields
}

cross node response data

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetCode added in v1.1.21

func (x *Response) GetCode() int32

func (*Response) GetData added in v1.1.17

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

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Session

type Session struct {
	Sid       string            `protobuf:"bytes,1,opt,name=sid,proto3" json:"sid,omitempty"`             // session unique id
	Uid       int64             `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`            // user id
	AgentPath string            `protobuf:"bytes,3,opt,name=agentPath,proto3" json:"agentPath,omitempty"` // frontend actor agent path
	Ip        string            `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`               // ip address
	Mid       uint32            `protobuf:"varint,5,opt,name=mid,proto3" json:"mid,omitempty"`            // message id of the message being routed; per message, not session state
	Data      map[string]string ``                                                                        // extend data
	/* 135-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Session) ActorPath added in v1.3.0

func (x *Session) ActorPath() string

func (*Session) Add added in v1.3.0

func (x *Session) Add(key string, value interface{})

func (*Session) Clear added in v1.3.0

func (x *Session) Clear()

Clear releases all settings related to current sc

func (*Session) Contains added in v1.3.0

func (x *Session) Contains(key string) bool

func (*Session) Descriptor deprecated

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

Deprecated: Use Session.ProtoReflect.Descriptor instead.

func (*Session) Equal added in v1.4.7

func (x *Session) Equal(key, value string) bool

func (*Session) GetAgentPath added in v1.3.0

func (x *Session) GetAgentPath() string

func (*Session) GetData

func (x *Session) GetData() map[string]string

func (*Session) GetInt added in v1.3.0

func (x *Session) GetInt(key string) int

func (*Session) GetInt32 added in v1.3.0

func (x *Session) GetInt32(key string) int32

GetInt32 returns the value associated with the key as a int32.

func (*Session) GetInt64 added in v1.3.0

func (x *Session) GetInt64(key string) int64

func (*Session) GetIp added in v1.1.20

func (x *Session) GetIp() string

func (*Session) GetMID added in v1.4.8

func (x *Session) GetMID() uint32

GetMID returns the message id of the message currently being routed.

func (*Session) GetMid added in v1.3.0

func (x *Session) GetMid() uint32

func (*Session) GetSid

func (x *Session) GetSid() string

func (*Session) GetString added in v1.3.0

func (x *Session) GetString(key string) string

GetString returns the value associated with the key as a string.

func (*Session) GetUid

func (x *Session) GetUid() int64

func (*Session) GetUint added in v1.3.0

func (x *Session) GetUint(key string) uint

func (*Session) ImportAll added in v1.3.0

func (x *Session) ImportAll(data map[string]string)

func (*Session) IsBind added in v1.3.0

func (x *Session) IsBind() bool

func (*Session) ProtoMessage

func (*Session) ProtoMessage()

func (*Session) ProtoReflect

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

func (*Session) Remove added in v1.3.0

func (x *Session) Remove(key string)

func (*Session) Reset

func (x *Session) Reset()

func (*Session) Restore added in v1.3.0

func (x *Session) Restore(data map[string]string)

func (*Session) Set added in v1.3.0

func (x *Session) Set(key string, value string)

func (*Session) SetMID added in v1.4.8

func (x *Session) SetMID(mid uint32)

SetMID sets the message id of the message currently being routed.

mid is per message, not session state: only write it on the per-message session copy built for a single incoming packet. Writing it on a session shared with another goroutine is a data race.

func (*Session) String

func (x *Session) String() string

type SessionData added in v1.6.7

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

SessionData is the session key/values of one connection.

It is the one part of a connection reached from several goroutines — a socket read goroutine routes on it while the connection's own actor writes it — so the lock that makes those accesses safe lives here, with the data. Every read and write goes through a method below; the map itself is never handed out.

It sits next to Session because it is what a Session's Data is built from: a session handed to a handler carries a Clone, so the handler reads a consistent copy while the connection keeps writing to the live values.

The zero value is ready to use.

func (*SessionData) Clone added in v1.6.7

func (p *SessionData) Clone() map[string]string

Clone returns a copy of the key/values, taken in one go so the result is a consistent view rather than a mix of before and after some concurrent write.

The copy is the caller's alone, so it can be read on any goroutine without locking. It is nil when there is nothing to copy.

func (*SessionData) Get added in v1.6.7

func (p *SessionData) Get(key string) string

Get reads one key, returning "" when it is not set.

func (*SessionData) Has added in v1.6.7

func (p *SessionData) Has(key string) bool

Has reports whether the key is set.

func (*SessionData) Remove added in v1.6.7

func (p *SessionData) Remove(key string)

Remove drops one key.

func (*SessionData) Set added in v1.6.7

func (p *SessionData) Set(key, value string)

Set writes one key. A blank key or value is ignored.

Jump to

Keyboard shortcuts

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