Documentation
¶
Index ¶
- Constants
- Variables
- func ValidatePacket(packet *Packet, limits Limits) error
- type Bool
- type CancelNotify
- type ClusterMessage
- func (*ClusterMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ClusterMessage) GetCode() int32
- func (x *ClusterMessage) GetCodec() int32
- func (x *ClusterMessage) GetDeadlineUnixMs() int64
- func (x *ClusterMessage) GetMessage() string
- func (x *ClusterMessage) GetMessageId() uint64
- func (x *ClusterMessage) GetMetadata() map[string][]byte
- func (x *ClusterMessage) GetMethodId() uint32
- func (x *ClusterMessage) GetMsgType() MsgType
- func (x *ClusterMessage) GetPayload() []byte
- func (x *ClusterMessage) GetRequestId() uint32
- func (x *ClusterMessage) GetSession() *Session
- func (x *ClusterMessage) GetTargetPath() string
- func (*ClusterMessage) ProtoMessage()
- func (x *ClusterMessage) ProtoReflect() protoreflect.Message
- func (x *ClusterMessage) Reset()
- func (x *ClusterMessage) String() string
- type Double
- type GoAwayNotify
- func (*GoAwayNotify) Descriptor() ([]byte, []int)deprecated
- func (x *GoAwayNotify) GetReasonCode() int32
- func (x *GoAwayNotify) GetRetryAfterMs() uint32
- func (*GoAwayNotify) ProtoMessage()
- func (x *GoAwayNotify) ProtoReflect() protoreflect.Message
- func (x *GoAwayNotify) Reset()
- func (x *GoAwayNotify) String() string
- type HTTPError
- func (*HTTPError) Descriptor() ([]byte, []int)deprecated
- func (x *HTTPError) GetCode() int32
- func (x *HTTPError) GetMessage() string
- func (x *HTTPError) GetRequestId() string
- func (*HTTPError) ProtoMessage()
- func (x *HTTPError) ProtoReflect() protoreflect.Message
- func (x *HTTPError) Reset()
- func (x *HTTPError) String() string
- type HandshakeRequest
- func (*HandshakeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HandshakeRequest) GetSupportedVersions() []uint32
- func (*HandshakeRequest) ProtoMessage()
- func (x *HandshakeRequest) ProtoReflect() protoreflect.Message
- func (x *HandshakeRequest) Reset()
- func (x *HandshakeRequest) String() string
- type HandshakeResponse
- func (*HandshakeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HandshakeResponse) GetConnectionId() string
- func (x *HandshakeResponse) GetHeartbeatIntervalMs() uint32
- func (x *HandshakeResponse) GetMaxFrameSize() uint32
- func (x *HandshakeResponse) GetProtocolVersion() uint32
- func (*HandshakeResponse) ProtoMessage()
- func (x *HandshakeResponse) ProtoReflect() protoreflect.Message
- func (x *HandshakeResponse) Reset()
- func (x *HandshakeResponse) String() string
- type HeartbeatRequest
- type HeartbeatResponse
- func (*HeartbeatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HeartbeatResponse) GetClientTimeMs() int64
- func (x *HeartbeatResponse) GetServerTimeMs() int64
- func (*HeartbeatResponse) ProtoMessage()
- func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message
- func (x *HeartbeatResponse) Reset()
- func (x *HeartbeatResponse) String() string
- type I32
- type Int32
- type Int32Int32
- type Int32Int64
- type Int32Int64Map
- type Int32List
- type Int32Map
- type Int64
- type Int64Int32
- type Int64Int64
- type Int64List
- type KickNotify
- func (*KickNotify) Descriptor() ([]byte, []int)deprecated
- func (x *KickNotify) GetReason() string
- func (x *KickNotify) GetReasonCode() int32
- func (x *KickNotify) GetReconnectable() bool
- func (*KickNotify) ProtoMessage()
- func (x *KickNotify) ProtoReflect() protoreflect.Message
- func (x *KickNotify) Reset()
- func (x *KickNotify) String() string
- type Limits
- type Member
- func (*Member) Descriptor() ([]byte, []int)deprecated
- func (x *Member) GetAddress() string
- func (x *Member) GetHeartbeatTimeout() int64
- func (x *Member) GetLastAt() int64
- func (x *Member) GetNodeID() string
- func (x *Member) GetNodeType() string
- func (x *Member) GetSettings() map[string]string
- func (x *Member) IsTimeout(nowMills int64) bool
- func (*Member) ProtoMessage()
- func (x *Member) ProtoReflect() protoreflect.Message
- func (x *Member) Reset()
- func (x *Member) String() string
- type MemberList
- type MsgType
- type NodeID
- type None
- type Notify
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)deprecated
- func (x *Packet) GetCodec() int32
- func (x *Packet) GetKind() isPacket_Kind
- func (x *Packet) GetMetadata() map[string][]byte
- func (x *Packet) GetNotify() *Notify
- func (x *Packet) GetRequest() *Request
- func (x *Packet) GetResponse() *Response
- func (*Packet) ProtoMessage()
- func (x *Packet) ProtoReflect() protoreflect.Message
- func (x *Packet) Reset()
- func (x *Packet) String() string
- type PacketCodec
- type Packet_Notify
- type Packet_Request
- type Packet_Response
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() []byte
- func (x *Request) GetMethodId() uint32
- func (x *Request) GetRequestId() uint32
- func (x *Request) GetTimeoutMs() uint32
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetBody() []byte
- func (x *Response) GetCode() int32
- func (x *Response) GetMessage() string
- func (x *Response) GetRequestId() uint32
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Session
- func (x *Session) Clear()
- func (x *Session) Contains(key string) bool
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) Equal(key, value string) bool
- func (x *Session) GetData() map[string]string
- func (x *Session) GetInt(key string) int
- func (x *Session) GetInt32(key string) int32
- func (x *Session) GetInt64(key string) int64
- func (x *Session) GetIp() string
- func (x *Session) GetSid() string
- func (x *Session) GetString(key string) string
- func (x *Session) GetUid() int64
- func (x *Session) GetUint(key string) uint
- func (x *Session) ImportAll(data map[string]string)
- func (x *Session) IsBind() bool
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Remove(key string)
- func (x *Session) Reset()
- func (x *Session) Restore(data map[string]string)
- func (x *Session) Set(key string, value string)
- func (x *Session) SetAny(key string, value any)
- func (x *Session) String() string
- type StatusCode
- type String
- type StringKeyValue
- func (*StringKeyValue) Descriptor() ([]byte, []int)deprecated
- func (x *StringKeyValue) GetKey() string
- func (x *StringKeyValue) GetValue() string
- func (*StringKeyValue) ProtoMessage()
- func (x *StringKeyValue) ProtoReflect() protoreflect.Message
- func (x *StringKeyValue) Reset()
- func (x *StringKeyValue) String() string
Constants ¶
const ( // System method IDs are reserved for connection control and cannot be // registered by business Actors. SystemMethodHandshake uint32 = 1 SystemMethodHeartbeat uint32 = 2 SystemMethodCancel uint32 = 3 SystemMethodGoAway uint32 = 4 SystemMethodKick uint32 = 5 )
const DefaultMaxPacketSize = 4 << 20
DefaultMaxPacketSize is the maximum encoded AGP packet size (4 MiB).
Variables ¶
var ( StatusCode_name = map[int32]string{ 0: "STATUS_OK", 1: "STATUS_CANCELLED", 2: "STATUS_INVALID_ARGUMENT", 3: "STATUS_DEADLINE_EXCEEDED", 4: "STATUS_NOT_FOUND", 5: "STATUS_ALREADY_EXISTS", 6: "STATUS_PERMISSION_DENIED", 7: "STATUS_UNAUTHENTICATED", 8: "STATUS_RESOURCE_EXHAUSTED", 9: "STATUS_FAILED_PRECONDITION", 10: "STATUS_ABORTED", 11: "STATUS_INTERNAL", 12: "STATUS_UNAVAILABLE", 13: "STATUS_UNSUPPORTED_MEDIA", } StatusCode_value = map[string]int32{ "STATUS_OK": 0, "STATUS_CANCELLED": 1, "STATUS_INVALID_ARGUMENT": 2, "STATUS_DEADLINE_EXCEEDED": 3, "STATUS_NOT_FOUND": 4, "STATUS_ALREADY_EXISTS": 5, "STATUS_PERMISSION_DENIED": 6, "STATUS_UNAUTHENTICATED": 7, "STATUS_RESOURCE_EXHAUSTED": 8, "STATUS_FAILED_PRECONDITION": 9, "STATUS_ABORTED": 10, "STATUS_INTERNAL": 11, "STATUS_UNAVAILABLE": 12, "STATUS_UNSUPPORTED_MEDIA": 13, } )
Enum value maps for StatusCode.
var ( MsgType_name = map[int32]string{ 0: "REQUEST", 1: "RESPONSE", 2: "NOTIFY", } MsgType_value = map[string]int32{ "REQUEST": 0, "RESPONSE": 1, "NOTIFY": 2, } )
Enum value maps for MsgType.
var File_net_proto_agp_proto protoreflect.FileDescriptor
var File_net_proto_base_type_proto protoreflect.FileDescriptor
var File_net_proto_cluster_message_proto protoreflect.FileDescriptor
var File_net_proto_proto_proto protoreflect.FileDescriptor
Functions ¶
func ValidatePacket ¶ added in v1.0.20
ValidatePacket checks structural invariants before a packet reaches routing.
Types ¶
type Bool ¶ added in v1.0.8
type Bool struct {
Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Bool) Descriptor
deprecated
added in
v1.0.8
func (*Bool) ProtoMessage ¶ added in v1.0.8
func (*Bool) ProtoMessage()
func (*Bool) ProtoReflect ¶ added in v1.0.8
func (x *Bool) ProtoReflect() protoreflect.Message
type CancelNotify ¶ added in v1.0.20
type CancelNotify struct {
RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// contains filtered or unexported fields
}
CancelNotify cancels an in-flight Request on the same connection.
func (*CancelNotify) Descriptor
deprecated
added in
v1.0.20
func (*CancelNotify) Descriptor() ([]byte, []int)
Deprecated: Use CancelNotify.ProtoReflect.Descriptor instead.
func (*CancelNotify) GetRequestId ¶ added in v1.0.20
func (x *CancelNotify) GetRequestId() uint32
func (*CancelNotify) ProtoMessage ¶ added in v1.0.20
func (*CancelNotify) ProtoMessage()
func (*CancelNotify) ProtoReflect ¶ added in v1.0.20
func (x *CancelNotify) ProtoReflect() protoreflect.Message
func (*CancelNotify) Reset ¶ added in v1.0.20
func (x *CancelNotify) Reset()
func (*CancelNotify) String ¶ added in v1.0.20
func (x *CancelNotify) String() string
type ClusterMessage ¶ added in v1.0.20
type ClusterMessage struct {
MessageId uint64 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
MsgType MsgType `protobuf:"varint,2,opt,name=msg_type,json=msgType,proto3,enum=actorgo.cluster.v1.MsgType" json:"msg_type,omitempty"`
RequestId uint32 `protobuf:"varint,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
MethodId uint32 `protobuf:"varint,4,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"`
DeadlineUnixMs int64 `protobuf:"varint,5,opt,name=deadline_unix_ms,json=deadlineUnixMs,proto3" json:"deadline_unix_ms,omitempty"` // Absolute deadline preserves one budget across hops.
TargetPath string `protobuf:"bytes,6,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` // Optional; only used for an explicit child Actor.
Session *Session `protobuf:"bytes,7,opt,name=session,proto3" json:"session,omitempty"` // Snapshot of caller session; same layout as local Session.
Metadata map[string][]byte `` /* 143-byte string literal not displayed */
Codec int32 `protobuf:"varint,9,opt,name=codec,proto3" json:"codec,omitempty"`
Payload []byte `protobuf:"bytes,10,opt,name=payload,proto3" json:"payload,omitempty"`
Code int32 `protobuf:"varint,11,opt,name=code,proto3" json:"code,omitempty"` // Response status; zero for requests and notifications.
Message string `protobuf:"bytes,12,opt,name=message,proto3" json:"message,omitempty"` // Response error text.
// contains filtered or unexported fields
}
ClusterMessage is the protobuf-only NATS message. payload uses codec, matching the original AGP or HTTP request body encoding.
func (*ClusterMessage) Descriptor
deprecated
added in
v1.0.20
func (*ClusterMessage) Descriptor() ([]byte, []int)
Deprecated: Use ClusterMessage.ProtoReflect.Descriptor instead.
func (*ClusterMessage) GetCode ¶ added in v1.0.20
func (x *ClusterMessage) GetCode() int32
func (*ClusterMessage) GetCodec ¶ added in v1.0.20
func (x *ClusterMessage) GetCodec() int32
func (*ClusterMessage) GetDeadlineUnixMs ¶ added in v1.0.20
func (x *ClusterMessage) GetDeadlineUnixMs() int64
func (*ClusterMessage) GetMessage ¶ added in v1.0.20
func (x *ClusterMessage) GetMessage() string
func (*ClusterMessage) GetMessageId ¶ added in v1.0.20
func (x *ClusterMessage) GetMessageId() uint64
func (*ClusterMessage) GetMetadata ¶ added in v1.0.20
func (x *ClusterMessage) GetMetadata() map[string][]byte
func (*ClusterMessage) GetMethodId ¶ added in v1.0.20
func (x *ClusterMessage) GetMethodId() uint32
func (*ClusterMessage) GetMsgType ¶ added in v1.0.20
func (x *ClusterMessage) GetMsgType() MsgType
func (*ClusterMessage) GetPayload ¶ added in v1.0.20
func (x *ClusterMessage) GetPayload() []byte
func (*ClusterMessage) GetRequestId ¶ added in v1.0.20
func (x *ClusterMessage) GetRequestId() uint32
func (*ClusterMessage) GetSession ¶ added in v1.0.20
func (x *ClusterMessage) GetSession() *Session
func (*ClusterMessage) GetTargetPath ¶ added in v1.0.20
func (x *ClusterMessage) GetTargetPath() string
func (*ClusterMessage) ProtoMessage ¶ added in v1.0.20
func (*ClusterMessage) ProtoMessage()
func (*ClusterMessage) ProtoReflect ¶ added in v1.0.20
func (x *ClusterMessage) ProtoReflect() protoreflect.Message
func (*ClusterMessage) Reset ¶ added in v1.0.20
func (x *ClusterMessage) Reset()
func (*ClusterMessage) String ¶ added in v1.0.20
func (x *ClusterMessage) String() string
type Double ¶ added in v1.0.8
type Double struct {
Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Double) Descriptor
deprecated
added in
v1.0.8
func (*Double) ProtoMessage ¶ added in v1.0.8
func (*Double) ProtoMessage()
func (*Double) ProtoReflect ¶ added in v1.0.8
func (x *Double) ProtoReflect() protoreflect.Message
type GoAwayNotify ¶ added in v1.0.20
type GoAwayNotify struct {
ReasonCode int32 `protobuf:"varint,1,opt,name=reason_code,json=reasonCode,proto3" json:"reason_code,omitempty"`
RetryAfterMs uint32 `protobuf:"varint,2,opt,name=retry_after_ms,json=retryAfterMs,proto3" json:"retry_after_ms,omitempty"`
// contains filtered or unexported fields
}
GoAwayNotify is used during graceful server shutdown.
func (*GoAwayNotify) Descriptor
deprecated
added in
v1.0.20
func (*GoAwayNotify) Descriptor() ([]byte, []int)
Deprecated: Use GoAwayNotify.ProtoReflect.Descriptor instead.
func (*GoAwayNotify) GetReasonCode ¶ added in v1.0.20
func (x *GoAwayNotify) GetReasonCode() int32
func (*GoAwayNotify) GetRetryAfterMs ¶ added in v1.0.20
func (x *GoAwayNotify) GetRetryAfterMs() uint32
func (*GoAwayNotify) ProtoMessage ¶ added in v1.0.20
func (*GoAwayNotify) ProtoMessage()
func (*GoAwayNotify) ProtoReflect ¶ added in v1.0.20
func (x *GoAwayNotify) ProtoReflect() protoreflect.Message
func (*GoAwayNotify) Reset ¶ added in v1.0.20
func (x *GoAwayNotify) Reset()
func (*GoAwayNotify) String ¶ added in v1.0.20
func (x *GoAwayNotify) String() string
type HTTPError ¶ added in v1.0.20
type HTTPError struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// contains filtered or unexported fields
}
HTTPError is the stable error body returned by the curl/HTTP adapter.
func (*HTTPError) Descriptor
deprecated
added in
v1.0.20
func (*HTTPError) GetMessage ¶ added in v1.0.20
func (*HTTPError) GetRequestId ¶ added in v1.0.20
func (*HTTPError) ProtoMessage ¶ added in v1.0.20
func (*HTTPError) ProtoMessage()
func (*HTTPError) ProtoReflect ¶ added in v1.0.20
func (x *HTTPError) ProtoReflect() protoreflect.Message
type HandshakeRequest ¶ added in v1.0.20
type HandshakeRequest struct {
SupportedVersions []uint32 `protobuf:"varint,1,rep,packed,name=supported_versions,json=supportedVersions,proto3" json:"supported_versions,omitempty"`
// contains filtered or unexported fields
}
HandshakeRequest negotiates the highest protocol version supported by both ends.
func (*HandshakeRequest) Descriptor
deprecated
added in
v1.0.20
func (*HandshakeRequest) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeRequest.ProtoReflect.Descriptor instead.
func (*HandshakeRequest) GetSupportedVersions ¶ added in v1.0.20
func (x *HandshakeRequest) GetSupportedVersions() []uint32
func (*HandshakeRequest) ProtoMessage ¶ added in v1.0.20
func (*HandshakeRequest) ProtoMessage()
func (*HandshakeRequest) ProtoReflect ¶ added in v1.0.20
func (x *HandshakeRequest) ProtoReflect() protoreflect.Message
func (*HandshakeRequest) Reset ¶ added in v1.0.20
func (x *HandshakeRequest) Reset()
func (*HandshakeRequest) String ¶ added in v1.0.20
func (x *HandshakeRequest) String() string
type HandshakeResponse ¶ added in v1.0.20
type HandshakeResponse struct {
ProtocolVersion uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
HeartbeatIntervalMs uint32 `protobuf:"varint,2,opt,name=heartbeat_interval_ms,json=heartbeatIntervalMs,proto3" json:"heartbeat_interval_ms,omitempty"`
MaxFrameSize uint32 `protobuf:"varint,3,opt,name=max_frame_size,json=maxFrameSize,proto3" json:"max_frame_size,omitempty"`
ConnectionId string `protobuf:"bytes,4,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
// contains filtered or unexported fields
}
HandshakeResponse publishes connection-level limits selected by the server.
func (*HandshakeResponse) Descriptor
deprecated
added in
v1.0.20
func (*HandshakeResponse) Descriptor() ([]byte, []int)
Deprecated: Use HandshakeResponse.ProtoReflect.Descriptor instead.
func (*HandshakeResponse) GetConnectionId ¶ added in v1.0.20
func (x *HandshakeResponse) GetConnectionId() string
func (*HandshakeResponse) GetHeartbeatIntervalMs ¶ added in v1.0.20
func (x *HandshakeResponse) GetHeartbeatIntervalMs() uint32
func (*HandshakeResponse) GetMaxFrameSize ¶ added in v1.0.20
func (x *HandshakeResponse) GetMaxFrameSize() uint32
func (*HandshakeResponse) GetProtocolVersion ¶ added in v1.0.20
func (x *HandshakeResponse) GetProtocolVersion() uint32
func (*HandshakeResponse) ProtoMessage ¶ added in v1.0.20
func (*HandshakeResponse) ProtoMessage()
func (*HandshakeResponse) ProtoReflect ¶ added in v1.0.20
func (x *HandshakeResponse) ProtoReflect() protoreflect.Message
func (*HandshakeResponse) Reset ¶ added in v1.0.20
func (x *HandshakeResponse) Reset()
func (*HandshakeResponse) String ¶ added in v1.0.20
func (x *HandshakeResponse) String() string
type HeartbeatRequest ¶ added in v1.0.20
type HeartbeatRequest struct {
ClientTimeMs int64 `protobuf:"varint,1,opt,name=client_time_ms,json=clientTimeMs,proto3" json:"client_time_ms,omitempty"`
// contains filtered or unexported fields
}
HeartbeatRequest and HeartbeatResponse measure liveness without Actor routing.
func (*HeartbeatRequest) Descriptor
deprecated
added in
v1.0.20
func (*HeartbeatRequest) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.
func (*HeartbeatRequest) GetClientTimeMs ¶ added in v1.0.20
func (x *HeartbeatRequest) GetClientTimeMs() int64
func (*HeartbeatRequest) ProtoMessage ¶ added in v1.0.20
func (*HeartbeatRequest) ProtoMessage()
func (*HeartbeatRequest) ProtoReflect ¶ added in v1.0.20
func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message
func (*HeartbeatRequest) Reset ¶ added in v1.0.20
func (x *HeartbeatRequest) Reset()
func (*HeartbeatRequest) String ¶ added in v1.0.20
func (x *HeartbeatRequest) String() string
type HeartbeatResponse ¶ added in v1.0.20
type HeartbeatResponse struct {
ClientTimeMs int64 `protobuf:"varint,1,opt,name=client_time_ms,json=clientTimeMs,proto3" json:"client_time_ms,omitempty"`
ServerTimeMs int64 `protobuf:"varint,2,opt,name=server_time_ms,json=serverTimeMs,proto3" json:"server_time_ms,omitempty"`
// contains filtered or unexported fields
}
func (*HeartbeatResponse) Descriptor
deprecated
added in
v1.0.20
func (*HeartbeatResponse) Descriptor() ([]byte, []int)
Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
func (*HeartbeatResponse) GetClientTimeMs ¶ added in v1.0.20
func (x *HeartbeatResponse) GetClientTimeMs() int64
func (*HeartbeatResponse) GetServerTimeMs ¶ added in v1.0.20
func (x *HeartbeatResponse) GetServerTimeMs() int64
func (*HeartbeatResponse) ProtoMessage ¶ added in v1.0.20
func (*HeartbeatResponse) ProtoMessage()
func (*HeartbeatResponse) ProtoReflect ¶ added in v1.0.20
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message
func (*HeartbeatResponse) Reset ¶ added in v1.0.20
func (x *HeartbeatResponse) Reset()
func (*HeartbeatResponse) String ¶ added in v1.0.20
func (x *HeartbeatResponse) String() string
type I32 ¶
type I32 struct {
Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*I32) Descriptor
deprecated
func (*I32) ProtoMessage ¶
func (*I32) ProtoMessage()
func (*I32) ProtoReflect ¶
func (x *I32) ProtoReflect() protoreflect.Message
type Int32 ¶ added in v1.0.8
type Int32 struct {
Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Int32) Descriptor
deprecated
added in
v1.0.8
func (*Int32) ProtoMessage ¶ added in v1.0.8
func (*Int32) ProtoMessage()
func (*Int32) ProtoReflect ¶ added in v1.0.8
func (x *Int32) ProtoReflect() protoreflect.Message
type Int32Int32 ¶ added in v1.0.8
type Int32Int32 struct {
Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Int32Int32) Descriptor
deprecated
added in
v1.0.8
func (*Int32Int32) Descriptor() ([]byte, []int)
Deprecated: Use Int32Int32.ProtoReflect.Descriptor instead.
func (*Int32Int32) GetKey ¶ added in v1.0.8
func (x *Int32Int32) GetKey() int32
func (*Int32Int32) GetValue ¶ added in v1.0.8
func (x *Int32Int32) GetValue() int32
func (*Int32Int32) ProtoMessage ¶ added in v1.0.8
func (*Int32Int32) ProtoMessage()
func (*Int32Int32) ProtoReflect ¶ added in v1.0.8
func (x *Int32Int32) ProtoReflect() protoreflect.Message
func (*Int32Int32) Reset ¶ added in v1.0.8
func (x *Int32Int32) Reset()
func (*Int32Int32) String ¶ added in v1.0.8
func (x *Int32Int32) String() string
type Int32Int64 ¶ added in v1.0.8
type Int32Int64 struct {
Key int32 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Int32Int64) Descriptor
deprecated
added in
v1.0.8
func (*Int32Int64) Descriptor() ([]byte, []int)
Deprecated: Use Int32Int64.ProtoReflect.Descriptor instead.
func (*Int32Int64) GetKey ¶ added in v1.0.8
func (x *Int32Int64) GetKey() int32
func (*Int32Int64) GetValue ¶ added in v1.0.8
func (x *Int32Int64) GetValue() int64
func (*Int32Int64) ProtoMessage ¶ added in v1.0.8
func (*Int32Int64) ProtoMessage()
func (*Int32Int64) ProtoReflect ¶ added in v1.0.8
func (x *Int32Int64) ProtoReflect() protoreflect.Message
func (*Int32Int64) Reset ¶ added in v1.0.8
func (x *Int32Int64) Reset()
func (*Int32Int64) String ¶ added in v1.0.8
func (x *Int32Int64) String() string
type Int32Int64Map ¶ added in v1.0.8
type Int32Int64Map struct {
Value map[int32]int64 `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Int32Int64Map) Descriptor
deprecated
added in
v1.0.8
func (*Int32Int64Map) Descriptor() ([]byte, []int)
Deprecated: Use Int32Int64Map.ProtoReflect.Descriptor instead.
func (*Int32Int64Map) GetValue ¶ added in v1.0.8
func (x *Int32Int64Map) GetValue() map[int32]int64
func (*Int32Int64Map) ProtoMessage ¶ added in v1.0.8
func (*Int32Int64Map) ProtoMessage()
func (*Int32Int64Map) ProtoReflect ¶ added in v1.0.8
func (x *Int32Int64Map) ProtoReflect() protoreflect.Message
func (*Int32Int64Map) Reset ¶ added in v1.0.8
func (x *Int32Int64Map) Reset()
func (*Int32Int64Map) String ¶ added in v1.0.8
func (x *Int32Int64Map) String() string
type Int32List ¶ added in v1.0.8
type Int32List struct {
List []int32 `protobuf:"varint,1,rep,packed,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*Int32List) Descriptor
deprecated
added in
v1.0.8
func (*Int32List) ProtoMessage ¶ added in v1.0.8
func (*Int32List) ProtoMessage()
func (*Int32List) ProtoReflect ¶ added in v1.0.8
func (x *Int32List) ProtoReflect() protoreflect.Message
type Int32Map ¶ added in v1.0.8
type Int32Map struct {
Value map[int32]int32 `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Int32Map) Descriptor
deprecated
added in
v1.0.8
func (*Int32Map) ProtoMessage ¶ added in v1.0.8
func (*Int32Map) ProtoMessage()
func (*Int32Map) ProtoReflect ¶ added in v1.0.8
func (x *Int32Map) ProtoReflect() protoreflect.Message
type Int64 ¶ added in v1.0.8
type Int64 struct {
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Int64) Descriptor
deprecated
added in
v1.0.8
func (*Int64) ProtoMessage ¶ added in v1.0.8
func (*Int64) ProtoMessage()
func (*Int64) ProtoReflect ¶ added in v1.0.8
func (x *Int64) ProtoReflect() protoreflect.Message
type Int64Int32 ¶ added in v1.0.8
type Int64Int32 struct {
Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
Value int32 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Int64Int32) Descriptor
deprecated
added in
v1.0.8
func (*Int64Int32) Descriptor() ([]byte, []int)
Deprecated: Use Int64Int32.ProtoReflect.Descriptor instead.
func (*Int64Int32) GetKey ¶ added in v1.0.8
func (x *Int64Int32) GetKey() int64
func (*Int64Int32) GetValue ¶ added in v1.0.8
func (x *Int64Int32) GetValue() int32
func (*Int64Int32) ProtoMessage ¶ added in v1.0.8
func (*Int64Int32) ProtoMessage()
func (*Int64Int32) ProtoReflect ¶ added in v1.0.8
func (x *Int64Int32) ProtoReflect() protoreflect.Message
func (*Int64Int32) Reset ¶ added in v1.0.8
func (x *Int64Int32) Reset()
func (*Int64Int32) String ¶ added in v1.0.8
func (x *Int64Int32) String() string
type Int64Int64 ¶ added in v1.0.8
type Int64Int64 struct {
Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Int64Int64) Descriptor
deprecated
added in
v1.0.8
func (*Int64Int64) Descriptor() ([]byte, []int)
Deprecated: Use Int64Int64.ProtoReflect.Descriptor instead.
func (*Int64Int64) GetKey ¶ added in v1.0.8
func (x *Int64Int64) GetKey() int64
func (*Int64Int64) GetValue ¶ added in v1.0.8
func (x *Int64Int64) GetValue() int64
func (*Int64Int64) ProtoMessage ¶ added in v1.0.8
func (*Int64Int64) ProtoMessage()
func (*Int64Int64) ProtoReflect ¶ added in v1.0.8
func (x *Int64Int64) ProtoReflect() protoreflect.Message
func (*Int64Int64) Reset ¶ added in v1.0.8
func (x *Int64Int64) Reset()
func (*Int64Int64) String ¶ added in v1.0.8
func (x *Int64Int64) String() string
type Int64List ¶ added in v1.0.8
type Int64List struct {
List []int64 `protobuf:"varint,1,rep,packed,name=list,proto3" json:"list,omitempty"`
// contains filtered or unexported fields
}
func (*Int64List) Descriptor
deprecated
added in
v1.0.8
func (*Int64List) ProtoMessage ¶ added in v1.0.8
func (*Int64List) ProtoMessage()
func (*Int64List) ProtoReflect ¶ added in v1.0.8
func (x *Int64List) ProtoReflect() protoreflect.Message
type KickNotify ¶ added in v1.0.20
type KickNotify struct {
ReasonCode int32 `protobuf:"varint,1,opt,name=reason_code,json=reasonCode,proto3" json:"reason_code,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
Reconnectable bool `protobuf:"varint,3,opt,name=reconnectable,proto3" json:"reconnectable,omitempty"`
// contains filtered or unexported fields
}
KickNotify closes the connection and optionally permits client reconnection.
func (*KickNotify) Descriptor
deprecated
added in
v1.0.20
func (*KickNotify) Descriptor() ([]byte, []int)
Deprecated: Use KickNotify.ProtoReflect.Descriptor instead.
func (*KickNotify) GetReason ¶ added in v1.0.20
func (x *KickNotify) GetReason() string
func (*KickNotify) GetReasonCode ¶ added in v1.0.20
func (x *KickNotify) GetReasonCode() int32
func (*KickNotify) GetReconnectable ¶ added in v1.0.20
func (x *KickNotify) GetReconnectable() bool
func (*KickNotify) ProtoMessage ¶ added in v1.0.20
func (*KickNotify) ProtoMessage()
func (*KickNotify) ProtoReflect ¶ added in v1.0.20
func (x *KickNotify) ProtoReflect() protoreflect.Message
func (*KickNotify) Reset ¶ added in v1.0.20
func (x *KickNotify) Reset()
func (*KickNotify) String ¶ added in v1.0.20
func (x *KickNotify) String() string
type Limits ¶ added in v1.0.20
type Limits struct {
MaxPacketSize int
MaxBodySize int
MaxMetadataKeys int
MaxMetadataKey int
MaxMetadataValue int
MaxMetadataSize int
}
Limits bounds memory allocated while decoding one untrusted AGP packet.
func DefaultLimits ¶ added in v1.0.20
func DefaultLimits() Limits
DefaultLimits returns the server's default packet and metadata limits.
func NormalizeLimits ¶ added in v1.0.20
NormalizeLimits fills each unset field independently and keeps body limits within the packet limit. Transports and PacketCodec must share this result.
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) GetAddress ¶
func (*Member) GetHeartbeatTimeout ¶
func (*Member) GetNodeType ¶
func (*Member) GetSettings ¶
func (*Member) ProtoMessage ¶
func (*Member) ProtoMessage()
func (*Member) ProtoReflect ¶
func (x *Member) ProtoReflect() protoreflect.Message
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 MsgType ¶ added in v1.0.20
type MsgType int32
MsgType identifies the Actor operation carried between nodes.
func (MsgType) Descriptor ¶ added in v1.0.20
func (MsgType) Descriptor() protoreflect.EnumDescriptor
func (MsgType) EnumDescriptor
deprecated
added in
v1.0.20
func (MsgType) Number ¶ added in v1.0.20
func (x MsgType) Number() protoreflect.EnumNumber
func (MsgType) Type ¶ added in v1.0.20
func (MsgType) Type() protoreflect.EnumType
type NodeID ¶
type NodeID struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*NodeID) Descriptor
deprecated
func (*NodeID) ProtoMessage ¶
func (*NodeID) ProtoMessage()
func (*NodeID) ProtoReflect ¶
func (x *NodeID) ProtoReflect() protoreflect.Message
type None ¶ added in v1.0.8
type None struct {
// contains filtered or unexported fields
}
func (*None) Descriptor
deprecated
added in
v1.0.8
func (*None) ProtoMessage ¶ added in v1.0.8
func (*None) ProtoMessage()
func (*None) ProtoReflect ¶ added in v1.0.8
func (x *None) ProtoReflect() protoreflect.Message
type Notify ¶ added in v1.0.20
type Notify struct {
MethodId uint32 `protobuf:"varint,1,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"`
Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
Notify is one-way and never receives a Response.
func (*Notify) Descriptor
deprecated
added in
v1.0.20
func (*Notify) GetMethodId ¶ added in v1.0.20
func (*Notify) ProtoMessage ¶ added in v1.0.20
func (*Notify) ProtoMessage()
func (*Notify) ProtoReflect ¶ added in v1.0.20
func (x *Notify) ProtoReflect() protoreflect.Message
type Packet ¶ added in v1.0.20
type Packet struct {
// Types that are valid to be assigned to Kind:
//
// *Packet_Request
// *Packet_Response
// *Packet_Notify
Kind isPacket_Kind `protobuf_oneof:"kind"`
Metadata map[string][]byte `` /* 143-byte string literal not displayed */
Codec int32 `protobuf:"varint,5,opt,name=codec,proto3" json:"codec,omitempty"`
// contains filtered or unexported fields
}
Packet is the complete AGP application frame. The outer frame is always protobuf; codec selects only how Request/Response/Notify.body is encoded.
func (*Packet) Descriptor
deprecated
added in
v1.0.20
func (*Packet) GetMetadata ¶ added in v1.0.20
func (*Packet) GetRequest ¶ added in v1.0.20
func (*Packet) GetResponse ¶ added in v1.0.20
func (*Packet) ProtoMessage ¶ added in v1.0.20
func (*Packet) ProtoMessage()
func (*Packet) ProtoReflect ¶ added in v1.0.20
func (x *Packet) ProtoReflect() protoreflect.Message
type PacketCodec ¶ added in v1.0.20
type PacketCodec struct {
Limits Limits
}
PacketCodec validates and protobuf-encodes the AGP packet envelope.
func NewPacketCodec ¶ added in v1.0.20
func NewPacketCodec(limits Limits) *PacketCodec
NewPacketCodec creates a codec and applies DefaultLimits when limits are empty.
type Packet_Notify ¶ added in v1.0.20
type Packet_Notify struct {
Notify *Notify `protobuf:"bytes,3,opt,name=notify,proto3,oneof"`
}
type Packet_Request ¶ added in v1.0.20
type Packet_Request struct {
Request *Request `protobuf:"bytes,1,opt,name=request,proto3,oneof"`
}
type Packet_Response ¶ added in v1.0.20
type Packet_Response struct {
Response *Response `protobuf:"bytes,2,opt,name=response,proto3,oneof"`
}
type Request ¶ added in v1.0.20
type Request struct {
RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
MethodId uint32 `protobuf:"varint,2,opt,name=method_id,json=methodId,proto3" json:"method_id,omitempty"`
TimeoutMs uint32 `protobuf:"varint,3,opt,name=timeout_ms,json=timeoutMs,proto3" json:"timeout_ms,omitempty"`
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
Request expects exactly one Response with the same request_id.
func (*Request) Descriptor
deprecated
added in
v1.0.20
func (*Request) GetMethodId ¶ added in v1.0.20
func (*Request) GetRequestId ¶ added in v1.0.20
func (*Request) GetTimeoutMs ¶ added in v1.0.20
func (*Request) ProtoMessage ¶ added in v1.0.20
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶ added in v1.0.20
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct {
RequestId uint32 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
// contains filtered or unexported fields
}
Response carries transport status separately from the encoded business body.
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶ added in v1.0.20
func (*Response) GetRequestId ¶ added in v1.0.20
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
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
Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"` // ip address
Data map[string]string `` // extend data
/* 135-byte string literal not displayed */
// contains filtered or unexported fields
}
Session contains connection/user state only. Request IDs never live here.
func (*Session) Descriptor
deprecated
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type StatusCode ¶ added in v1.0.20
type StatusCode int32
StatusCode is shared by AGP, HTTP Actor calls and cluster envelopes.
const ( StatusCode_STATUS_OK StatusCode = 0 StatusCode_STATUS_CANCELLED StatusCode = 1 StatusCode_STATUS_INVALID_ARGUMENT StatusCode = 2 StatusCode_STATUS_DEADLINE_EXCEEDED StatusCode = 3 StatusCode_STATUS_NOT_FOUND StatusCode = 4 StatusCode_STATUS_ALREADY_EXISTS StatusCode = 5 StatusCode_STATUS_PERMISSION_DENIED StatusCode = 6 StatusCode_STATUS_UNAUTHENTICATED StatusCode = 7 StatusCode_STATUS_RESOURCE_EXHAUSTED StatusCode = 8 StatusCode_STATUS_FAILED_PRECONDITION StatusCode = 9 StatusCode_STATUS_ABORTED StatusCode = 10 StatusCode_STATUS_INTERNAL StatusCode = 11 StatusCode_STATUS_UNAVAILABLE StatusCode = 12 StatusCode_STATUS_UNSUPPORTED_MEDIA StatusCode = 13 )
func (StatusCode) Descriptor ¶ added in v1.0.20
func (StatusCode) Descriptor() protoreflect.EnumDescriptor
func (StatusCode) Enum ¶ added in v1.0.20
func (x StatusCode) Enum() *StatusCode
func (StatusCode) EnumDescriptor
deprecated
added in
v1.0.20
func (StatusCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use StatusCode.Descriptor instead.
func (StatusCode) Number ¶ added in v1.0.20
func (x StatusCode) Number() protoreflect.EnumNumber
func (StatusCode) String ¶ added in v1.0.20
func (x StatusCode) String() string
func (StatusCode) Type ¶ added in v1.0.20
func (StatusCode) Type() protoreflect.EnumType
type String ¶ added in v1.0.8
type String struct {
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*String) Descriptor
deprecated
added in
v1.0.8
func (*String) ProtoMessage ¶ added in v1.0.8
func (*String) ProtoMessage()
func (*String) ProtoReflect ¶ added in v1.0.8
func (x *String) ProtoReflect() protoreflect.Message
type StringKeyValue ¶ added in v1.0.8
type StringKeyValue struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*StringKeyValue) Descriptor
deprecated
added in
v1.0.8
func (*StringKeyValue) Descriptor() ([]byte, []int)
Deprecated: Use StringKeyValue.ProtoReflect.Descriptor instead.
func (*StringKeyValue) GetKey ¶ added in v1.0.8
func (x *StringKeyValue) GetKey() string
func (*StringKeyValue) GetValue ¶ added in v1.0.8
func (x *StringKeyValue) GetValue() string
func (*StringKeyValue) ProtoMessage ¶ added in v1.0.8
func (*StringKeyValue) ProtoMessage()
func (*StringKeyValue) ProtoReflect ¶ added in v1.0.8
func (x *StringKeyValue) ProtoReflect() protoreflect.Message
func (*StringKeyValue) Reset ¶ added in v1.0.8
func (x *StringKeyValue) Reset()
func (*StringKeyValue) String ¶ added in v1.0.8
func (x *StringKeyValue) String() string