Documentation ¶
Index ¶
- Variables
- func C2S_Promise_MessageID() rpc.MessageID
- func C2S_Promise_MessageName() string
- func C2S_Promise_ResponseMessageID() rpc.MessageID
- func Put_C2S_Promise(i any)
- func Put_S2C_Promise(i any)
- func S2C_Promise_MessageID() rpc.MessageID
- func S2C_Promise_MessageName() string
- func S2C_Promise_ResponseMessageID() rpc.MessageID
- type C2S_Promise
- func (m *C2S_Promise) Clone() *C2S_Promise
- func (*C2S_Promise) Descriptor() ([]byte, []int)
- func (this *C2S_Promise) Equal(that any) bool
- func (m *C2S_Promise) GetReqMsgData() []byte
- func (m *C2S_Promise) GetReqMsgID() uint32
- func (m *C2S_Promise) GetSeq() uint64
- func (this *C2S_Promise) GoString() string
- func (m *C2S_Promise) Marshal() (dAtA []byte, err error)
- func (m *C2S_Promise) MarshalTo(dAtA []byte) (int, error)
- func (m *C2S_Promise) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (C2S_Promise) MessageID() rpc.MessageID
- func (C2S_Promise) MessageName() string
- func (*C2S_Promise) ProtoMessage()
- func (C2S_Promise) RPC()
- func (m *C2S_Promise) Reset()
- func (m *C2S_Promise) ResetEx()
- func (C2S_Promise) ResponseMessageID() rpc.MessageID
- func (m *C2S_Promise) Size() (n int)
- func (this *C2S_Promise) String() string
- func (m *C2S_Promise) Unmarshal(dAtA []byte) error
- func (m *C2S_Promise) XXX_DiscardUnknown()
- func (m *C2S_Promise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *C2S_Promise) XXX_Merge(src proto.Message)
- func (m *C2S_Promise) XXX_Size() int
- func (m *C2S_Promise) XXX_Unmarshal(b []byte) error
- type ErrMarshalResponseMessageFail
- type ErrNotExist
- type ErrProduceRequestMessageFail
- type ErrProduceResponseMessageFail
- type ErrTimeout
- type ErrUnmarshalRequestMessageFail
- type ErrUnmarshalResponseMessageFail
- type IPromiseTask
- type Promise
- type PromiseCallback
- type PromiseContext
- func (p *PromiseContext) Error() error
- func (p PromiseContext) Receiver() *aactor.PID
- func (p PromiseContext) RequestMessage() nrpc.IMessage
- func (p PromiseContext) Requested() bool
- func (p PromiseContext) ResponseMessage() nrpc.IMessage
- func (p PromiseContext) Seq() Seq
- func (p *PromiseContext) SetError(err error)
- func (p *PromiseContext) SetReceiver(receiver *aactor.PID)
- func (p *PromiseContext) SetRequestMessage(iRequestMessage nrpc.IMessage)
- func (p *PromiseContext) SetRequested(requested bool)
- func (p *PromiseContext) SetResponseMessage(iResponseMessage nrpc.IMessage)
- type PromiseOnCompleted
- type S2C_Promise
- func (m *S2C_Promise) Clone() *S2C_Promise
- func (*S2C_Promise) Descriptor() ([]byte, []int)
- func (this *S2C_Promise) Equal(that any) bool
- func (m *S2C_Promise) GetRespMsgData() []byte
- func (m *S2C_Promise) GetRespMsgID() uint32
- func (m *S2C_Promise) GetSeq() uint64
- func (this *S2C_Promise) GoString() string
- func (m *S2C_Promise) Marshal() (dAtA []byte, err error)
- func (m *S2C_Promise) MarshalTo(dAtA []byte) (int, error)
- func (m *S2C_Promise) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (S2C_Promise) MessageID() rpc.MessageID
- func (S2C_Promise) MessageName() string
- func (*S2C_Promise) ProtoMessage()
- func (S2C_Promise) RPC()
- func (m *S2C_Promise) Reset()
- func (m *S2C_Promise) ResetEx()
- func (S2C_Promise) ResponseMessageID() rpc.MessageID
- func (m *S2C_Promise) Size() (n int)
- func (this *S2C_Promise) String() string
- func (m *S2C_Promise) Unmarshal(dAtA []byte) error
- func (m *S2C_Promise) XXX_DiscardUnknown()
- func (m *S2C_Promise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *S2C_Promise) XXX_Merge(src proto.Message)
- func (m *S2C_Promise) XXX_Size() int
- func (m *S2C_Promise) XXX_Unmarshal(b []byte) error
- type Seq
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupProto = fmt.Errorf("proto: unexpected end of group") )
View Source
var Protocol = nrpc.Protocol(nil)
Functions ¶
func C2S_Promise_MessageID ¶
func C2S_Promise_MessageName ¶
func C2S_Promise_MessageName() string
func Put_C2S_Promise ¶
func Put_C2S_Promise(i any)
func Put_S2C_Promise ¶
func Put_S2C_Promise(i any)
func S2C_Promise_MessageID ¶
func S2C_Promise_MessageName ¶
func S2C_Promise_MessageName() string
Types ¶
type C2S_Promise ¶
type C2S_Promise struct { ///序列 Seq uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"` ///请求消息id ReqMsgID uint32 `protobuf:"varint,2,opt,name=ReqMsgID,proto3" json:"ReqMsgID,omitempty"` ///请求消息数据 ReqMsgData []byte `protobuf:"bytes,3,opt,name=ReqMsgData,proto3" json:"ReqMsgData,omitempty"` }
/ 异步请求 @id=1
func Get_C2S_Promise ¶
func Get_C2S_Promise() *C2S_Promise
func New_C2S_Promise ¶
func New_C2S_Promise() *C2S_Promise
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// message C2S_Promise begin
func (*C2S_Promise) Clone ¶
func (m *C2S_Promise) Clone() *C2S_Promise
func (*C2S_Promise) Descriptor ¶
func (*C2S_Promise) Descriptor() ([]byte, []int)
func (*C2S_Promise) Equal ¶
func (this *C2S_Promise) Equal(that any) bool
func (*C2S_Promise) GetReqMsgData ¶
func (m *C2S_Promise) GetReqMsgData() []byte
func (*C2S_Promise) GetReqMsgID ¶
func (m *C2S_Promise) GetReqMsgID() uint32
func (*C2S_Promise) GetSeq ¶
func (m *C2S_Promise) GetSeq() uint64
func (*C2S_Promise) GoString ¶
func (this *C2S_Promise) GoString() string
func (*C2S_Promise) Marshal ¶
func (m *C2S_Promise) Marshal() (dAtA []byte, err error)
func (*C2S_Promise) MarshalToSizedBuffer ¶
func (m *C2S_Promise) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (C2S_Promise) MessageID ¶
func (C2S_Promise) MessageID() rpc.MessageID
func (C2S_Promise) MessageName ¶
func (C2S_Promise) MessageName() string
func (*C2S_Promise) ProtoMessage ¶
func (*C2S_Promise) ProtoMessage()
func (C2S_Promise) RPC ¶
func (C2S_Promise) RPC()
func (*C2S_Promise) Reset ¶
func (m *C2S_Promise) Reset()
func (*C2S_Promise) ResetEx ¶
func (m *C2S_Promise) ResetEx()
func (C2S_Promise) ResponseMessageID ¶
func (C2S_Promise) ResponseMessageID() rpc.MessageID
func (*C2S_Promise) Size ¶
func (m *C2S_Promise) Size() (n int)
func (*C2S_Promise) String ¶
func (this *C2S_Promise) String() string
func (*C2S_Promise) Unmarshal ¶
func (m *C2S_Promise) Unmarshal(dAtA []byte) error
func (*C2S_Promise) XXX_DiscardUnknown ¶
func (m *C2S_Promise) XXX_DiscardUnknown()
func (*C2S_Promise) XXX_Marshal ¶
func (m *C2S_Promise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*C2S_Promise) XXX_Merge ¶
func (m *C2S_Promise) XXX_Merge(src proto.Message)
func (*C2S_Promise) XXX_Size ¶
func (m *C2S_Promise) XXX_Size() int
func (*C2S_Promise) XXX_Unmarshal ¶
func (m *C2S_Promise) XXX_Unmarshal(b []byte) error
type ErrMarshalResponseMessageFail ¶
type ErrMarshalResponseMessageFail struct { Seq Seq RequestMessageID nrpc.MessageID ResponseMessageID nrpc.MessageID Err error }
func (ErrMarshalResponseMessageFail) Error ¶
func (e ErrMarshalResponseMessageFail) Error() string
type ErrNotExist ¶
type ErrNotExist struct {
Seq Seq
}
func (ErrNotExist) Error ¶
func (e ErrNotExist) Error() string
type ErrProduceRequestMessageFail ¶
func (ErrProduceRequestMessageFail) Error ¶
func (e ErrProduceRequestMessageFail) Error() string
type ErrProduceResponseMessageFail ¶
type ErrProduceResponseMessageFail struct { Seq Seq RequestMessageID nrpc.MessageID ResponseMessageID nrpc.MessageID Err error }
func (ErrProduceResponseMessageFail) Error ¶
func (e ErrProduceResponseMessageFail) Error() string
type ErrTimeout ¶
type ErrTimeout struct { Seq Seq RequestMessageID nrpc.MessageID }
func (ErrTimeout) Error ¶
func (e ErrTimeout) Error() string
type ErrUnmarshalRequestMessageFail ¶
func (ErrUnmarshalRequestMessageFail) Error ¶
func (e ErrUnmarshalRequestMessageFail) Error() string
type ErrUnmarshalResponseMessageFail ¶
type ErrUnmarshalResponseMessageFail struct { Seq Seq RequestMessageID nrpc.MessageID ResponseMessageID nrpc.MessageID Err error }
func (ErrUnmarshalResponseMessageFail) Error ¶
func (e ErrUnmarshalResponseMessageFail) Error() string
type IPromiseTask ¶
type IPromiseTask interface { Promise() *Promise Next() IPromiseTask SetNext(next IPromiseTask) }
type Promise ¶
type Promise struct { *PromiseContext // contains filtered or unexported fields }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
func (*Promise) OnComplete ¶
func (p *Promise) OnComplete(cb PromiseOnCompleted) *Promise
func (*Promise) Then ¶
func (p *Promise) Then(cb PromiseCallback) *Promise
type PromiseCallback ¶
type PromiseCallback = func(ctx *PromiseContext)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
type PromiseContext ¶
type PromiseContext struct {
// contains filtered or unexported fields
}
func (*PromiseContext) Error ¶
func (p *PromiseContext) Error() error
func (PromiseContext) Receiver ¶
func (p PromiseContext) Receiver() *aactor.PID
func (PromiseContext) RequestMessage ¶
func (p PromiseContext) RequestMessage() nrpc.IMessage
func (PromiseContext) Requested ¶
func (p PromiseContext) Requested() bool
func (PromiseContext) ResponseMessage ¶
func (p PromiseContext) ResponseMessage() nrpc.IMessage
func (PromiseContext) Seq ¶
func (p PromiseContext) Seq() Seq
func (*PromiseContext) SetError ¶
func (p *PromiseContext) SetError(err error)
func (*PromiseContext) SetReceiver ¶
func (p *PromiseContext) SetReceiver(receiver *aactor.PID)
func (*PromiseContext) SetRequestMessage ¶
func (p *PromiseContext) SetRequestMessage(iRequestMessage nrpc.IMessage)
func (*PromiseContext) SetRequested ¶
func (p *PromiseContext) SetRequested(requested bool)
func (*PromiseContext) SetResponseMessage ¶
func (p *PromiseContext) SetResponseMessage(iResponseMessage nrpc.IMessage)
type PromiseOnCompleted ¶
type PromiseOnCompleted = func(err error, ctx *PromiseContext)
type S2C_Promise ¶
type S2C_Promise struct { ///序列 Seq uint64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq,omitempty"` ///回复消息id RespMsgID uint32 `protobuf:"varint,2,opt,name=RespMsgID,proto3" json:"RespMsgID,omitempty"` ///回复消息数据 RespMsgData []byte `protobuf:"bytes,3,opt,name=RespMsgData,proto3" json:"RespMsgData,omitempty"` }
/ 异步回复 @id=2
func Get_S2C_Promise ¶
func Get_S2C_Promise() *S2C_Promise
func New_S2C_Promise ¶
func New_S2C_Promise() *S2C_Promise
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// message S2C_Promise begin
func (*S2C_Promise) Clone ¶
func (m *S2C_Promise) Clone() *S2C_Promise
func (*S2C_Promise) Descriptor ¶
func (*S2C_Promise) Descriptor() ([]byte, []int)
func (*S2C_Promise) Equal ¶
func (this *S2C_Promise) Equal(that any) bool
func (*S2C_Promise) GetRespMsgData ¶
func (m *S2C_Promise) GetRespMsgData() []byte
func (*S2C_Promise) GetRespMsgID ¶
func (m *S2C_Promise) GetRespMsgID() uint32
func (*S2C_Promise) GetSeq ¶
func (m *S2C_Promise) GetSeq() uint64
func (*S2C_Promise) GoString ¶
func (this *S2C_Promise) GoString() string
func (*S2C_Promise) Marshal ¶
func (m *S2C_Promise) Marshal() (dAtA []byte, err error)
func (*S2C_Promise) MarshalToSizedBuffer ¶
func (m *S2C_Promise) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (S2C_Promise) MessageID ¶
func (S2C_Promise) MessageID() rpc.MessageID
func (S2C_Promise) MessageName ¶
func (S2C_Promise) MessageName() string
func (*S2C_Promise) ProtoMessage ¶
func (*S2C_Promise) ProtoMessage()
func (S2C_Promise) RPC ¶
func (S2C_Promise) RPC()
func (*S2C_Promise) Reset ¶
func (m *S2C_Promise) Reset()
func (*S2C_Promise) ResetEx ¶
func (m *S2C_Promise) ResetEx()
func (S2C_Promise) ResponseMessageID ¶
func (S2C_Promise) ResponseMessageID() rpc.MessageID
func (*S2C_Promise) Size ¶
func (m *S2C_Promise) Size() (n int)
func (*S2C_Promise) String ¶
func (this *S2C_Promise) String() string
func (*S2C_Promise) Unmarshal ¶
func (m *S2C_Promise) Unmarshal(dAtA []byte) error
func (*S2C_Promise) XXX_DiscardUnknown ¶
func (m *S2C_Promise) XXX_DiscardUnknown()
func (*S2C_Promise) XXX_Marshal ¶
func (m *S2C_Promise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*S2C_Promise) XXX_Merge ¶
func (m *S2C_Promise) XXX_Merge(src proto.Message)
func (*S2C_Promise) XXX_Size ¶
func (m *S2C_Promise) XXX_Size() int
func (*S2C_Promise) XXX_Unmarshal ¶
func (m *S2C_Promise) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.