Documentation ¶
Overview ¶
Package message represents message that messagebus can route
Index ¶
- func Deserialize(buff io.Reader) (core.Message, error)
- func MustSerializeBytes(msg core.Message) []byte
- func Serialize(msg core.Message) (io.Reader, error)
- type ActivateClass
- type ActivateObject
- type ActivateObjectDelegate
- type BaseLogicMessage
- type CallConstructor
- type CallMethod
- type DeactivateClass
- type DeactivateObject
- type DeclareType
- type DeployCode
- type GetChildren
- type GetClass
- type GetCode
- type GetDelegate
- type GetObject
- type IBaseLogicMessage
- type MethodReturnMode
- type RegisterChild
- type RequestCall
- type SaveAs
- type UpdateClass
- type UpdateObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Deserialize returns decoded message.
func MustSerializeBytes ¶ added in v0.5.0
MustSerializeBytes returns encoded core.Message, panics on error.
Types ¶
type ActivateClass ¶
type ActivateClass struct { Domain core.RecordRef Request core.RecordRef // contains filtered or unexported fields }
ActivateClass activates class.
func (*ActivateClass) Target ¶
func (e *ActivateClass) Target() *core.RecordRef
Target implementation of Message interface.
func (ActivateClass) TargetRole ¶
TargetRole implementation of Message interface.
func (*ActivateClass) Type ¶
func (e *ActivateClass) Type() core.MessageType
Type implementation of Message interface.
type ActivateObject ¶
type ActivateObject struct { Domain core.RecordRef Request core.RecordRef Class core.RecordRef Parent core.RecordRef Memory []byte // contains filtered or unexported fields }
ActivateObject activates object.
func (*ActivateObject) Target ¶
func (e *ActivateObject) Target() *core.RecordRef
Target implementation of Message interface.
func (ActivateObject) TargetRole ¶
TargetRole implementation of Message interface.
func (*ActivateObject) Type ¶
func (e *ActivateObject) Type() core.MessageType
Type implementation of Message interface.
type ActivateObjectDelegate ¶
type ActivateObjectDelegate struct { Domain core.RecordRef Request core.RecordRef Class core.RecordRef Parent core.RecordRef Memory []byte // contains filtered or unexported fields }
ActivateObjectDelegate similar to ActivateObjType but it creates object as parent's delegate of provided class.
func (*ActivateObjectDelegate) Target ¶
func (e *ActivateObjectDelegate) Target() *core.RecordRef
Target implementation of Message interface.
func (ActivateObjectDelegate) TargetRole ¶
TargetRole implementation of Message interface.
func (*ActivateObjectDelegate) Type ¶
func (e *ActivateObjectDelegate) Type() core.MessageType
Type implementation of Message interface.
type BaseLogicMessage ¶ added in v0.5.0
BaseLogicMessage base of event class family, do not use it standalone
func (*BaseLogicMessage) GetCaller ¶ added in v0.5.0
func (e *BaseLogicMessage) GetCaller() *core.RecordRef
func (*BaseLogicMessage) TargetRole ¶ added in v0.5.0
func (e *BaseLogicMessage) TargetRole() core.JetRole
TargetRole returns RoleVirtualExecutor as routing target role.
type CallConstructor ¶
type CallConstructor struct { BaseLogicMessage ParentRef core.RecordRef SaveAs SaveAs ClassRef core.RecordRef Name string Arguments core.Arguments PulseNum core.PulseNumber }
CallConstructor is a message for calling constructor and obtain its reply
func (*CallConstructor) GetReference ¶ added in v0.5.0
func (e *CallConstructor) GetReference() core.RecordRef
func (*CallConstructor) Target ¶
func (e *CallConstructor) Target() *core.RecordRef
Target returns request ref as routing target.
func (*CallConstructor) Type ¶
func (e *CallConstructor) Type() core.MessageType
Type returns TypeCallConstructor.
type CallMethod ¶
type CallMethod struct { BaseLogicMessage ReturnMode MethodReturnMode ObjectRef core.RecordRef Method string Arguments core.Arguments }
CallMethod - Simply call method and return result
func (*CallMethod) GetReference ¶ added in v0.5.0
func (e *CallMethod) GetReference() core.RecordRef
func (*CallMethod) Target ¶
func (e *CallMethod) Target() *core.RecordRef
Target returns ObjectRef as routing target.
type DeactivateClass ¶
type DeactivateClass struct { Domain core.RecordRef Request core.RecordRef Class core.RecordRef // contains filtered or unexported fields }
DeactivateClass deactivates class.
func (*DeactivateClass) Target ¶
func (e *DeactivateClass) Target() *core.RecordRef
Target implementation of Message interface.
func (DeactivateClass) TargetRole ¶
TargetRole implementation of Message interface.
func (*DeactivateClass) Type ¶
func (e *DeactivateClass) Type() core.MessageType
Type implementation of Message interface.
type DeactivateObject ¶
type DeactivateObject struct { Domain core.RecordRef Request core.RecordRef Object core.RecordRef // contains filtered or unexported fields }
DeactivateObject deactivates object.
func (*DeactivateObject) Target ¶
func (e *DeactivateObject) Target() *core.RecordRef
Target implementation of Message interface.
func (DeactivateObject) TargetRole ¶
TargetRole implementation of Message interface.
func (*DeactivateObject) Type ¶
func (e *DeactivateObject) Type() core.MessageType
Type implementation of Message interface.
type DeclareType ¶
type DeclareType struct { Domain core.RecordRef Request core.RecordRef TypeDec []byte // contains filtered or unexported fields }
DeclareType creates new type.
func (*DeclareType) Target ¶
func (e *DeclareType) Target() *core.RecordRef
Target implementation of Message interface.
func (DeclareType) TargetRole ¶
TargetRole implementation of Message interface.
func (*DeclareType) Type ¶
func (e *DeclareType) Type() core.MessageType
Type implementation of Message interface.
type DeployCode ¶
type DeployCode struct { Domain core.RecordRef Request core.RecordRef CodeMap map[core.MachineType][]byte // contains filtered or unexported fields }
DeployCode creates new code.
func (*DeployCode) Target ¶
func (e *DeployCode) Target() *core.RecordRef
Target implementation of Message interface.
func (DeployCode) TargetRole ¶
TargetRole implementation of Message interface.
func (*DeployCode) Type ¶
func (e *DeployCode) Type() core.MessageType
Type implementation of Message interface.
type GetChildren ¶ added in v0.5.0
type GetChildren struct { Parent core.RecordRef FromChild *core.RecordID FromPulse *core.PulseNumber Amount int // contains filtered or unexported fields }
GetChildren retrieves a chunk of children references.
func (*GetChildren) Target ¶ added in v0.5.0
func (e *GetChildren) Target() *core.RecordRef
Target implementation of Message interface.
func (GetChildren) TargetRole ¶ added in v0.5.0
TargetRole implementation of Message interface.
func (*GetChildren) Type ¶ added in v0.5.0
func (e *GetChildren) Type() core.MessageType
Type implementation of Message interface.
type GetClass ¶
type GetClass struct { Head core.RecordRef State *core.RecordRef // If nil, will fetch the latest state. // contains filtered or unexported fields }
GetClass retrieves class from storage.
func (GetClass) TargetRole ¶
TargetRole implementation of Message interface.
func (*GetClass) Type ¶
func (e *GetClass) Type() core.MessageType
Type implementation of Message interface.
type GetCode ¶
type GetCode struct { Code core.RecordRef MachinePref []core.MachineType // contains filtered or unexported fields }
GetCode retrieves code from storage.
func (GetCode) TargetRole ¶
TargetRole implementation of Message interface.
func (*GetCode) Type ¶
func (e *GetCode) Type() core.MessageType
Type implementation of Message interface.
type GetDelegate ¶
type GetDelegate struct { Head core.RecordRef AsClass core.RecordRef // contains filtered or unexported fields }
GetDelegate retrieves object represented as provided class.
func (*GetDelegate) Target ¶
func (e *GetDelegate) Target() *core.RecordRef
Target implementation of Message interface.
func (GetDelegate) TargetRole ¶
TargetRole implementation of Message interface.
func (*GetDelegate) Type ¶
func (e *GetDelegate) Type() core.MessageType
Type implementation of Message interface.
type GetObject ¶
type GetObject struct { Head core.RecordRef State *core.RecordRef // If nil, will fetch the latest state. // contains filtered or unexported fields }
GetObject retrieves object from storage.
func (GetObject) TargetRole ¶
TargetRole implementation of Message interface.
func (*GetObject) Type ¶
func (e *GetObject) Type() core.MessageType
Type implementation of Message interface.
type IBaseLogicMessage ¶ added in v0.5.0
type MethodReturnMode ¶
type MethodReturnMode int
MethodReturnMode ENUM to set when method returns its result
const ( // ReturnResult - return result as soon as it is ready ReturnResult MethodReturnMode = iota // ReturnNoWait - call method and return without results ReturnNoWait )
type RegisterChild ¶ added in v0.5.0
type RegisterChild struct { Parent core.RecordRef Child core.RecordRef // contains filtered or unexported fields }
RegisterChild amends object.
func (*RegisterChild) Target ¶ added in v0.5.0
func (e *RegisterChild) Target() *core.RecordRef
Target implementation of Message interface.
func (RegisterChild) TargetRole ¶ added in v0.5.0
TargetRole implementation of Message interface.
func (*RegisterChild) Type ¶ added in v0.5.0
func (e *RegisterChild) Type() core.MessageType
Type implementation of Message interface.
type RequestCall ¶ added in v0.5.0
RequestCall is a Ledger's message wrapping logicrunner's Call messages.
func (*RequestCall) TargetRole ¶ added in v0.5.0
func (*RequestCall) TargetRole() core.JetRole
TargetRole implementation of Message interface.
func (*RequestCall) Type ¶ added in v0.5.0
func (*RequestCall) Type() core.MessageType
Type implementation of Message interface.
type UpdateClass ¶
type UpdateClass struct { Domain core.RecordRef Request core.RecordRef Class core.RecordRef Code core.RecordRef Migrations []core.RecordRef // contains filtered or unexported fields }
UpdateClass amends class.
func (*UpdateClass) Target ¶
func (e *UpdateClass) Target() *core.RecordRef
Target implementation of Message interface.
func (UpdateClass) TargetRole ¶
TargetRole implementation of Message interface.
func (*UpdateClass) Type ¶
func (e *UpdateClass) Type() core.MessageType
Type implementation of Message interface.
type UpdateObject ¶
type UpdateObject struct { Domain core.RecordRef Request core.RecordRef Object core.RecordRef Memory []byte // contains filtered or unexported fields }
UpdateObject amends object.
func (*UpdateObject) Target ¶
func (e *UpdateObject) Target() *core.RecordRef
Target implementation of Message interface.
func (UpdateObject) TargetRole ¶
TargetRole implementation of Message interface.
func (*UpdateObject) Type ¶
func (e *UpdateObject) Type() core.MessageType
Type implementation of Message interface.