Documentation ¶
Index ¶
- Constants
- Variables
- func Deserialize(in []byte) (any, error)
- func Serialize(msg any) ([]byte, error)
- type Codec
- type ConnMap
- type IRequest
- type IResponse
- type ISerializer
- type MessageEnvelope
- func (*MessageEnvelope) Descriptor() ([]byte, []int)deprecated
- func (x *MessageEnvelope) GetData() []byte
- func (x *MessageEnvelope) GetSender() *actor.PID
- func (x *MessageEnvelope) GetTarget() *actor.PID
- func (*MessageEnvelope) ProtoMessage()
- func (x *MessageEnvelope) ProtoReflect() protoreflect.Message
- func (x *MessageEnvelope) Reset()
- func (x *MessageEnvelope) String() string
- type Process
- type ProtoSerializer
- type Remote
- type Request
Constants ¶
View Source
const ( RpcCategoryCast = int8(iota) RpcCategoryCall )
Variables ¶
View Source
var (
ErrMustProtoMessage = errors.New("must be protobuf v2 message")
)
View Source
var File_core_remote_remote_proto protoreflect.FileDescriptor
Functions ¶
func Deserialize ¶
Types ¶
type ISerializer ¶
type ISerializer interface { Serialize(msg any) ([]byte, error) // 序列化 Deserialize(fullName string, in []byte) (any, error) //反序列化 FullName(msg any) (string, error) //获取传输协议消息体全剧唯一完整名称 }
ISerializer 传输协议消息序列化解释器
type MessageEnvelope ¶
type MessageEnvelope struct { Target *actor.PID `protobuf:"bytes,1,opt,name=Target,proto3" json:"Target,omitempty"` //receiver Sender *actor.PID `protobuf:"bytes,2,opt,name=Sender,proto3" json:"Sender,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"Data,omitempty"` // contains filtered or unexported fields }
func (*MessageEnvelope) Descriptor
deprecated
func (*MessageEnvelope) Descriptor() ([]byte, []int)
Deprecated: Use MessageEnvelope.ProtoReflect.Descriptor instead.
func (*MessageEnvelope) GetData ¶
func (x *MessageEnvelope) GetData() []byte
func (*MessageEnvelope) GetSender ¶
func (x *MessageEnvelope) GetSender() *actor.PID
func (*MessageEnvelope) GetTarget ¶
func (x *MessageEnvelope) GetTarget() *actor.PID
func (*MessageEnvelope) ProtoMessage ¶
func (*MessageEnvelope) ProtoMessage()
func (*MessageEnvelope) ProtoReflect ¶
func (x *MessageEnvelope) ProtoReflect() protoreflect.Message
func (*MessageEnvelope) Reset ¶
func (x *MessageEnvelope) Reset()
func (*MessageEnvelope) String ¶
func (x *MessageEnvelope) String() string
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func (*Process) GracefulStop ¶
func (p *Process) GracefulStop()
type ProtoSerializer ¶
type ProtoSerializer struct{}
func (ProtoSerializer) Deserialize ¶
func (ps ProtoSerializer) Deserialize(fullName string, bytes []byte) (any, error)
Click to show internal directories.
Click to hide internal directories.