proxypb

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SessionEndReason_name = map[int32]string{
		0: "SESSION_END_REASON_UNSPECIFIED",
		1: "SESSION_END_REASON_DISCONNECTED",
		2: "SESSION_END_REASON_REPLACED",
		3: "SESSION_END_REASON_EXPIRED",
		4: "SESSION_END_REASON_SHUTDOWN",
	}
	SessionEndReason_value = map[string]int32{
		"SESSION_END_REASON_UNSPECIFIED":  0,
		"SESSION_END_REASON_DISCONNECTED": 1,
		"SESSION_END_REASON_REPLACED":     2,
		"SESSION_END_REASON_EXPIRED":      3,
		"SESSION_END_REASON_SHUTDOWN":     4,
	}
)

Enum value maps for SessionEndReason.

View Source
var File_aifd_proxy_proxy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ClientSessionClosed added in v0.3.0

type ClientSessionClosed struct {
	Session *ClientSessionRef `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	Reason  SessionEndReason  `protobuf:"varint,2,opt,name=reason,proto3,enum=aifd.proxy.SessionEndReason" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

ClientSessionClosed closes only the referenced connection, never the entire UID.

func (*ClientSessionClosed) Descriptor deprecated added in v0.3.0

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

Deprecated: Use ClientSessionClosed.ProtoReflect.Descriptor instead.

func (*ClientSessionClosed) GetReason added in v0.3.0

func (x *ClientSessionClosed) GetReason() SessionEndReason

func (*ClientSessionClosed) GetSession added in v0.3.0

func (x *ClientSessionClosed) GetSession() *ClientSessionRef

func (*ClientSessionClosed) ProtoMessage added in v0.3.0

func (*ClientSessionClosed) ProtoMessage()

func (*ClientSessionClosed) ProtoReflect added in v0.3.0

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

func (*ClientSessionClosed) Reset added in v0.3.0

func (x *ClientSessionClosed) Reset()

func (*ClientSessionClosed) String added in v0.3.0

func (x *ClientSessionClosed) String() string

type ClientSessionRef added in v0.3.0

type ClientSessionRef struct {
	ProxyInstanceId string `protobuf:"bytes,1,opt,name=proxy_instance_id,json=proxyInstanceId,proto3" json:"proxy_instance_id,omitempty"`
	ConnectionId    string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	// contains filtered or unexported fields
}

ClientSessionRef identifies one authenticated connection across proxy restarts.

func (*ClientSessionRef) Descriptor deprecated added in v0.3.0

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

Deprecated: Use ClientSessionRef.ProtoReflect.Descriptor instead.

func (*ClientSessionRef) GetConnectionId added in v0.3.0

func (x *ClientSessionRef) GetConnectionId() string

func (*ClientSessionRef) GetProxyInstanceId added in v0.3.0

func (x *ClientSessionRef) GetProxyInstanceId() string

func (*ClientSessionRef) ProtoMessage added in v0.3.0

func (*ClientSessionRef) ProtoMessage()

func (*ClientSessionRef) ProtoReflect added in v0.3.0

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

func (*ClientSessionRef) Reset added in v0.3.0

func (x *ClientSessionRef) Reset()

func (*ClientSessionRef) String added in v0.3.0

func (x *ClientSessionRef) String() string

type MceSessionHeartbeat added in v0.3.0

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

MceSessionHeartbeat is the optional framework heartbeat request.

func (*MceSessionHeartbeat) Descriptor deprecated added in v0.3.0

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

Deprecated: Use MceSessionHeartbeat.ProtoReflect.Descriptor instead.

func (*MceSessionHeartbeat) ProtoMessage added in v0.3.0

func (*MceSessionHeartbeat) ProtoMessage()

func (*MceSessionHeartbeat) ProtoReflect added in v0.3.0

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

func (*MceSessionHeartbeat) Reset added in v0.3.0

func (x *MceSessionHeartbeat) Reset()

func (*MceSessionHeartbeat) String added in v0.3.0

func (x *MceSessionHeartbeat) String() string

type MseSessionHeartbeat added in v0.3.0

type MseSessionHeartbeat struct {
	ServerTimeUnixMs int64 `protobuf:"varint,1,opt,name=server_time_unix_ms,json=serverTimeUnixMs,proto3" json:"server_time_unix_ms,omitempty"`
	// contains filtered or unexported fields
}

MseSessionHeartbeat completes the original request; it is not a UID broadcast.

func (*MseSessionHeartbeat) Descriptor deprecated added in v0.3.0

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

Deprecated: Use MseSessionHeartbeat.ProtoReflect.Descriptor instead.

func (*MseSessionHeartbeat) GetServerTimeUnixMs added in v0.3.0

func (x *MseSessionHeartbeat) GetServerTimeUnixMs() int64

func (*MseSessionHeartbeat) ProtoMessage added in v0.3.0

func (*MseSessionHeartbeat) ProtoMessage()

func (*MseSessionHeartbeat) ProtoReflect added in v0.3.0

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

func (*MseSessionHeartbeat) Reset added in v0.3.0

func (x *MseSessionHeartbeat) Reset()

func (*MseSessionHeartbeat) String added in v0.3.0

func (x *MseSessionHeartbeat) String() string

type MsgHead

type MsgHead struct {

	// pb 数据块长度;为 0 时表示没有 body。
	Len int32 `protobuf:"varint,1,opt,name=len,proto3" json:"len,omitempty"`
	// rpc 回调 inbox;为 0 时表示普通推送或无需回调。
	Inbox int32 `protobuf:"varint,2,opt,name=inbox,proto3" json:"inbox,omitempty"`
	// 路由主题,通常是 MceMsgIn、McwMsgIn.mail 或 McwMsgIn.1 这类主题。
	Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
	// protobuf 结构名。响应 inbox 时 topic 可以为空,但 pbType 必须能说明 body 类型。
	PbType string `protobuf:"bytes,4,opt,name=pbType,proto3" json:"pbType,omitempty"`
	// contains filtered or unexported fields
}

MsgHead 是客户端与 proxy 通信时的 PB 帧头。

线格式为:

protobuf(MsgHead) + protobuf(body)

其中 len 表示 body 的字节长度。解码方先解析 MsgHead,再按 len 从剩余 payload 中切出 body。

func (*MsgHead) Descriptor deprecated

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

Deprecated: Use MsgHead.ProtoReflect.Descriptor instead.

func (*MsgHead) GetInbox

func (x *MsgHead) GetInbox() int32

func (*MsgHead) GetLen

func (x *MsgHead) GetLen() int32

func (*MsgHead) GetPbType

func (x *MsgHead) GetPbType() string

func (*MsgHead) GetTopic

func (x *MsgHead) GetTopic() string

func (*MsgHead) ProtoMessage

func (*MsgHead) ProtoMessage()

func (*MsgHead) ProtoReflect

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

func (*MsgHead) Reset

func (x *MsgHead) Reset()

func (*MsgHead) String

func (x *MsgHead) String() string

type OpenClientSessionRequest added in v0.3.0

type OpenClientSessionRequest struct {
	Session *ClientSessionRef `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"`
	// contains filtered or unexported fields
}

OpenClientSessionRequest is sent only by a trusted proxy. UID is RPC metadata.

func (*OpenClientSessionRequest) Descriptor deprecated added in v0.3.0

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

Deprecated: Use OpenClientSessionRequest.ProtoReflect.Descriptor instead.

func (*OpenClientSessionRequest) GetSession added in v0.3.0

func (x *OpenClientSessionRequest) GetSession() *ClientSessionRef

func (*OpenClientSessionRequest) ProtoMessage added in v0.3.0

func (*OpenClientSessionRequest) ProtoMessage()

func (*OpenClientSessionRequest) ProtoReflect added in v0.3.0

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

func (*OpenClientSessionRequest) Reset added in v0.3.0

func (x *OpenClientSessionRequest) Reset()

func (*OpenClientSessionRequest) String added in v0.3.0

func (x *OpenClientSessionRequest) String() string

type OpenClientSessionResponse added in v0.3.0

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

func (*OpenClientSessionResponse) Descriptor deprecated added in v0.3.0

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

Deprecated: Use OpenClientSessionResponse.ProtoReflect.Descriptor instead.

func (*OpenClientSessionResponse) ProtoMessage added in v0.3.0

func (*OpenClientSessionResponse) ProtoMessage()

func (*OpenClientSessionResponse) ProtoReflect added in v0.3.0

func (*OpenClientSessionResponse) Reset added in v0.3.0

func (x *OpenClientSessionResponse) Reset()

func (*OpenClientSessionResponse) String added in v0.3.0

func (x *OpenClientSessionResponse) String() string

type RPCError added in v0.3.0

type RPCError struct {
	Code    string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

RPCError 是 RPC 错误 Header 在 WS body 中的编码;topic 和 pbType 均为 RPCError。

func (*RPCError) Descriptor deprecated added in v0.3.0

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

Deprecated: Use RPCError.ProtoReflect.Descriptor instead.

func (*RPCError) GetCode added in v0.3.0

func (x *RPCError) GetCode() string

func (*RPCError) GetMessage added in v0.3.0

func (x *RPCError) GetMessage() string

func (*RPCError) ProtoMessage added in v0.3.0

func (*RPCError) ProtoMessage()

func (*RPCError) ProtoReflect added in v0.3.0

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

func (*RPCError) Reset added in v0.3.0

func (x *RPCError) Reset()

func (*RPCError) String added in v0.3.0

func (x *RPCError) String() string

type SessionEndReason added in v0.3.0

type SessionEndReason int32
const (
	SessionEndReason_SESSION_END_REASON_UNSPECIFIED  SessionEndReason = 0
	SessionEndReason_SESSION_END_REASON_DISCONNECTED SessionEndReason = 1
	SessionEndReason_SESSION_END_REASON_REPLACED     SessionEndReason = 2
	SessionEndReason_SESSION_END_REASON_EXPIRED      SessionEndReason = 3
	SessionEndReason_SESSION_END_REASON_SHUTDOWN     SessionEndReason = 4
)

func (SessionEndReason) Descriptor added in v0.3.0

func (SessionEndReason) Enum added in v0.3.0

func (SessionEndReason) EnumDescriptor deprecated added in v0.3.0

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

Deprecated: Use SessionEndReason.Descriptor instead.

func (SessionEndReason) Number added in v0.3.0

func (SessionEndReason) String added in v0.3.0

func (x SessionEndReason) String() string

func (SessionEndReason) Type added in v0.3.0

Jump to

Keyboard shortcuts

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