message

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package message represents message that messagebus can route

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deserialize

func Deserialize(buff io.Reader) (core.Message, error)

Deserialize returns decoded message.

func DeserializeParcel added in v0.6.3

func DeserializeParcel(buff io.Reader) (core.Parcel, error)

DeserializeParcel returns decoded signed message.

func MustSerializeBytes added in v0.5.0

func MustSerializeBytes(msg core.Message) []byte

MustSerializeBytes returns encoded core.Message, panics on error.

func ParcelToBytes added in v0.6.3

func ParcelToBytes(msg core.Parcel) []byte

ParcelToBytes deserialize a core.Parcel to bytes.

func Serialize

func Serialize(msg core.Message) (io.Reader, error)

Serialize returns io.Reader on buffer with encoded core.Message.

func SerializeParcel added in v0.6.3

func SerializeParcel(parcel core.Parcel) (io.Reader, error)

SerializeParcel returns io.Reader on buffer with encoded core.Parcel.

func ToBytes added in v0.6.0

func ToBytes(msg core.Message) []byte

ToBytes serialize a core.Message to bytes.

Types

type AbandonedRequestsNotification added in v0.7.5

type AbandonedRequestsNotification struct {
	Object   core.RecordID
	Requests []core.RecordID
	// contains filtered or unexported fields
}

AbandonedRequestsNotification informs virtual node about unclosed requests.

func (*AbandonedRequestsNotification) AllowedSenderObjectAndRole added in v0.7.5

func (m *AbandonedRequestsNotification) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*AbandonedRequestsNotification) DefaultRole added in v0.7.5

DefaultRole returns role for this event

func (*AbandonedRequestsNotification) DefaultTarget added in v0.7.5

func (m *AbandonedRequestsNotification) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (AbandonedRequestsNotification) GetCaller added in v0.7.5

func (AbandonedRequestsNotification) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*AbandonedRequestsNotification) Type added in v0.7.5

Type implementation of Message interface.

type BaseLogicMessage added in v0.5.0

type BaseLogicMessage struct {
	Caller          core.RecordRef
	Request         core.RecordRef
	CallerPrototype core.RecordRef
	Nonce           uint64
	Sequence        uint64
}

BaseLogicMessage base of event class family, do not use it standalone

func (*BaseLogicMessage) AllowedSenderObjectAndRole added in v0.7.5

func (m *BaseLogicMessage) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

func (*BaseLogicMessage) DefaultRole added in v0.7.5

func (m *BaseLogicMessage) DefaultRole() core.DynamicRole

func (*BaseLogicMessage) DefaultTarget added in v0.7.5

func (m *BaseLogicMessage) DefaultTarget() *core.RecordRef

func (*BaseLogicMessage) GetBaseLogicMessage added in v0.7.5

func (m *BaseLogicMessage) GetBaseLogicMessage() *BaseLogicMessage

func (*BaseLogicMessage) GetCaller added in v0.5.0

func (m *BaseLogicMessage) GetCaller() *core.RecordRef

func (*BaseLogicMessage) GetCallerPrototype added in v0.6.3

func (m *BaseLogicMessage) GetCallerPrototype() *core.RecordRef

func (*BaseLogicMessage) GetReference added in v0.7.5

func (m *BaseLogicMessage) GetReference() core.RecordRef

func (*BaseLogicMessage) GetRequest added in v0.6.1

func (m *BaseLogicMessage) GetRequest() core.RecordRef

GetRequest returns DynamicRoleVirtualExecutor as routing target role.

func (*BaseLogicMessage) Type added in v0.7.5

func (m *BaseLogicMessage) Type() core.MessageType

type CallConstructor

type CallConstructor struct {
	BaseLogicMessage
	ParentRef    core.RecordRef
	SaveAs       SaveAs
	PrototypeRef core.RecordRef
	Name         string
	Arguments    core.Arguments
	PulseNum     core.PulseNumber
}

CallConstructor is a message for calling constructor and obtain its reply

func (*CallConstructor) AllowedSenderObjectAndRole added in v0.7.5

func (cc *CallConstructor) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

func (*CallConstructor) DefaultRole added in v0.7.5

func (*CallConstructor) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*CallConstructor) DefaultTarget added in v0.7.5

func (cc *CallConstructor) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*CallConstructor) GetReference added in v0.5.0

func (cc *CallConstructor) GetReference() core.RecordRef

func (*CallConstructor) ToMap added in v0.7.5

func (cc *CallConstructor) ToMap() (map[string]interface{}, error)

ToMap returns map representation of CallConstructor. Temporary until ledger.exporter api response reorganization

func (*CallConstructor) Type

func (cc *CallConstructor) Type() core.MessageType

Type returns TypeCallConstructor.

type CallMethod

type CallMethod struct {
	BaseLogicMessage
	ReturnMode     MethodReturnMode
	ObjectRef      core.RecordRef
	Method         string
	Arguments      core.Arguments
	ProxyPrototype core.RecordRef
}

CallMethod - Simply call method and return result

func (*CallMethod) AllowedSenderObjectAndRole added in v0.7.5

func (cm *CallMethod) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*CallMethod) DefaultRole added in v0.7.5

func (*CallMethod) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*CallMethod) DefaultTarget added in v0.7.5

func (cm *CallMethod) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*CallMethod) GetReference added in v0.5.0

func (cm *CallMethod) GetReference() core.RecordRef

func (*CallMethod) ToMap added in v0.7.5

func (cm *CallMethod) ToMap() (map[string]interface{}, error)

ToMap returns map representation of CallMethod. Temporary until ledger.exporter api response reorganization

func (*CallMethod) Type

func (cm *CallMethod) Type() core.MessageType

Type returns TypeCallMethod.

type CaseBindRequest added in v0.7.5

type CaseBindRequest struct {
	Parcel         core.Parcel
	Request        core.RecordRef
	MessageBusTape []byte
	Reply          core.Reply
	Error          string
}

type ExecutionQueueElement added in v0.7.5

type ExecutionQueueElement struct {
	Parcel  core.Parcel
	Request *core.RecordRef
	Pulse   core.PulseNumber
}

type ExecutorResults added in v0.6.0

type ExecutorResults struct {
	Caller    core.RecordRef
	RecordRef core.RecordRef
	Requests  []CaseBindRequest
	Queue     []ExecutionQueueElement
	Pending   PendingState
}

TODO rename to executorObjectResult (results?)

func (*ExecutorResults) AllowedSenderObjectAndRole added in v0.7.5

func (er *ExecutorResults) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*ExecutorResults) DefaultRole added in v0.7.5

func (er *ExecutorResults) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*ExecutorResults) DefaultTarget added in v0.7.5

func (er *ExecutorResults) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*ExecutorResults) GetCaller added in v0.6.0

func (er *ExecutorResults) GetCaller() *core.RecordRef

TODO change after changing pulsar

func (*ExecutorResults) GetReference added in v0.6.0

func (er *ExecutorResults) GetReference() core.RecordRef

func (*ExecutorResults) Type added in v0.6.0

func (er *ExecutorResults) Type() core.MessageType

type GenesisRequest added in v0.6.3

type GenesisRequest struct {
	// Name should be unique for each genesis record.
	Name string
}

GenesisRequest is used for genesis records generation.

func (*GenesisRequest) AllowedSenderObjectAndRole added in v0.7.5

func (*GenesisRequest) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GenesisRequest) DefaultRole added in v0.7.5

func (*GenesisRequest) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GenesisRequest) DefaultTarget added in v0.7.5

func (gr *GenesisRequest) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*GenesisRequest) GetCaller added in v0.6.3

func (*GenesisRequest) GetCaller() *core.RecordRef

GetCaller implementation for genesis request.

func (*GenesisRequest) Type added in v0.6.3

Type implementation for genesis request.

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) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetChildren) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetChildren) DefaultRole added in v0.7.5

func (*GetChildren) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetChildren) DefaultTarget added in v0.7.5

func (m *GetChildren) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetChildren) GetCaller added in v0.5.0

func (GetChildren) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetChildren) Type added in v0.5.0

func (*GetChildren) Type() core.MessageType

Type implementation of Message interface.

type GetCode

type GetCode struct {
	Code core.RecordRef
	// contains filtered or unexported fields
}

GetCode retrieves code From storage.

func (*GetCode) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetCode) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetCode) DefaultRole added in v0.7.5

func (*GetCode) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetCode) DefaultTarget added in v0.7.5

func (m *GetCode) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetCode) GetCaller

func (GetCode) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetCode) Type

func (*GetCode) Type() core.MessageType

Type implementation of Message interface.

type GetDelegate

type GetDelegate struct {
	Head   core.RecordRef
	AsType core.RecordRef
	// contains filtered or unexported fields
}

GetDelegate retrieves object represented as provided type.

func (*GetDelegate) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetDelegate) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetDelegate) DefaultRole added in v0.7.5

func (*GetDelegate) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetDelegate) DefaultTarget added in v0.7.5

func (m *GetDelegate) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetDelegate) GetCaller

func (GetDelegate) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetDelegate) Type

func (*GetDelegate) Type() core.MessageType

Type implementation of Message interface.

type GetJet added in v0.7.5

type GetJet struct {
	Object core.RecordID
	Pulse  core.PulseNumber
	// contains filtered or unexported fields
}

GetJet requests to calculate a jet for provided object.

func (*GetJet) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetJet) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetJet) DefaultRole added in v0.7.5

func (*GetJet) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetJet) DefaultTarget added in v0.7.5

func (m *GetJet) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetJet) GetCaller added in v0.7.5

func (GetJet) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetJet) Type added in v0.7.5

func (*GetJet) Type() core.MessageType

Type implementation of Message interface.

type GetObject

type GetObject struct {
	Head     core.RecordRef
	State    *core.RecordID // If nil, will fetch the latest state.
	Approved bool
	// contains filtered or unexported fields
}

GetObject retrieves object From storage.

func (*GetObject) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetObject) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetObject) DefaultRole added in v0.7.5

func (*GetObject) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetObject) DefaultTarget added in v0.7.5

func (m *GetObject) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetObject) GetCaller

func (GetObject) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetObject) Type

func (*GetObject) Type() core.MessageType

Type implementation of Message interface.

type GetObjectIndex added in v0.6.3

type GetObjectIndex struct {
	Object core.RecordRef
	// contains filtered or unexported fields
}

GetObjectIndex fetches objects index.

func (*GetObjectIndex) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetObjectIndex) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetObjectIndex) DefaultRole added in v0.7.5

func (*GetObjectIndex) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetObjectIndex) DefaultTarget added in v0.7.5

func (m *GetObjectIndex) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetObjectIndex) GetCaller added in v0.6.3

func (GetObjectIndex) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetObjectIndex) Type added in v0.6.3

Type implementation of Message interface.

type GetPendingRequests added in v0.7.5

type GetPendingRequests struct {
	Object core.RecordRef
	// contains filtered or unexported fields
}

GetPendingRequests fetches pending requests for object.

func (*GetPendingRequests) AllowedSenderObjectAndRole added in v0.7.5

func (m *GetPendingRequests) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*GetPendingRequests) DefaultRole added in v0.7.5

func (*GetPendingRequests) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*GetPendingRequests) DefaultTarget added in v0.7.5

func (m *GetPendingRequests) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (GetPendingRequests) GetCaller added in v0.7.5

func (GetPendingRequests) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*GetPendingRequests) Type added in v0.7.5

Type implementation of Message interface.

type HeavyPayload added in v0.6.3

type HeavyPayload struct {
	JetID    core.RecordID
	PulseNum core.PulseNumber
	Records  []core.KV
}

HeavyPayload carries Key/Value records and pulse number that replicates to Heavy Material node.

func (*HeavyPayload) AllowedSenderObjectAndRole added in v0.7.5

func (*HeavyPayload) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*HeavyPayload) DefaultRole added in v0.7.5

func (*HeavyPayload) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*HeavyPayload) DefaultTarget added in v0.7.5

func (hp *HeavyPayload) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (HeavyPayload) GetCaller added in v0.6.3

func (HeavyPayload) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*HeavyPayload) Type added in v0.6.3

func (e *HeavyPayload) Type() core.MessageType

Type implementation of Message interface.

type HeavyReset added in v0.7.5

type HeavyReset struct {
	JetID    core.RecordID
	PulseNum core.PulseNumber
}

HeavyReset carries heavy replication start/stop signal with pulse number.

func (*HeavyReset) AllowedSenderObjectAndRole added in v0.7.5

func (*HeavyReset) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*HeavyReset) DefaultRole added in v0.7.5

func (*HeavyReset) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*HeavyReset) DefaultTarget added in v0.7.5

func (*HeavyReset) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (HeavyReset) GetCaller added in v0.7.5

func (HeavyReset) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*HeavyReset) Type added in v0.7.5

func (e *HeavyReset) Type() core.MessageType

Type implementation of Message interface.

type HeavyStartStop added in v0.6.3

type HeavyStartStop struct {
	JetID    core.RecordID
	PulseNum core.PulseNumber
	Finished bool
}

HeavyStartStop carries heavy replication start/stop signal with pulse number.

func (*HeavyStartStop) AllowedSenderObjectAndRole added in v0.7.5

func (*HeavyStartStop) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*HeavyStartStop) DefaultRole added in v0.7.5

func (*HeavyStartStop) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*HeavyStartStop) DefaultTarget added in v0.7.5

func (*HeavyStartStop) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (HeavyStartStop) GetCaller added in v0.6.3

func (HeavyStartStop) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*HeavyStartStop) Type added in v0.6.3

func (e *HeavyStartStop) Type() core.MessageType

Type implementation of Message interface.

type HotData added in v0.7.5

type HotData struct {
	Jet                core.RecordRef
	DropJet            core.RecordID // If will be different in case of split.
	Drop               jet.JetDrop
	RecentObjects      map[core.RecordID]*HotIndex
	PendingRequests    map[core.RecordID]map[core.RecordID][]byte
	PulseNumber        core.PulseNumber
	JetDropSizeHistory jet.DropSizeHistory
	// contains filtered or unexported fields
}

HotData contains hot-data

func (*HotData) AllowedSenderObjectAndRole added in v0.7.5

func (m *HotData) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*HotData) DefaultRole added in v0.7.5

func (*HotData) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*HotData) DefaultTarget added in v0.7.5

func (m *HotData) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (HotData) GetCaller added in v0.7.5

func (HotData) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*HotData) Type added in v0.7.5

func (*HotData) Type() core.MessageType

Type implementation of Message interface.

type HotIndex added in v0.7.5

type HotIndex struct {
	TTL   int
	Index []byte
}

HotIndex contains meat about hot-data

type IBaseLogicMessage added in v0.5.0

type IBaseLogicMessage interface {
	core.Message
	GetBaseLogicMessage() *BaseLogicMessage
	GetReference() core.RecordRef
	GetRequest() core.RecordRef
	GetCallerPrototype() *core.RecordRef
}

type JetDrop added in v0.6.0

type JetDrop struct {
	JetID core.RecordID

	Drop        []byte
	Messages    [][]byte
	PulseNumber core.PulseNumber
	// contains filtered or unexported fields
}

JetDrop spreads jet drop

func (*JetDrop) AllowedSenderObjectAndRole added in v0.7.5

func (m *JetDrop) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*JetDrop) DefaultRole added in v0.7.5

func (*JetDrop) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*JetDrop) DefaultTarget added in v0.7.5

func (m *JetDrop) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (JetDrop) GetCaller added in v0.6.0

func (JetDrop) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*JetDrop) Type added in v0.6.0

func (*JetDrop) Type() core.MessageType

Type implementation of Message interface.

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 NodeSignPayload added in v0.7.5

type NodeSignPayload struct {
	NodeRef *core.RecordRef
}

func (*NodeSignPayload) AllowedSenderObjectAndRole added in v0.7.5

func (nsp *NodeSignPayload) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*NodeSignPayload) DefaultRole added in v0.7.5

func (nsp *NodeSignPayload) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*NodeSignPayload) DefaultTarget added in v0.7.5

func (nsp *NodeSignPayload) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (NodeSignPayload) GetCaller added in v0.7.5

func (NodeSignPayload) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*NodeSignPayload) GetNodeRef added in v0.7.5

func (e *NodeSignPayload) GetNodeRef() *core.RecordRef

func (*NodeSignPayload) Type added in v0.7.5

func (e *NodeSignPayload) Type() core.MessageType

Type implementation of Message interface.

type NodeSignPayloadInt added in v0.7.5

type NodeSignPayloadInt interface {
	core.Message
	GetNodeRef() *core.RecordRef
}

type Parcel added in v0.6.3

type Parcel struct {
	Sender        core.RecordRef
	Msg           core.Message
	Signature     []byte
	LogTraceID    string
	TraceSpanData []byte
	Token         core.DelegationToken
	PulseNumber   core.PulseNumber
}

Parcel is a message signed by senders private key.

func (*Parcel) AddDelegationToken added in v0.6.3

func (sm *Parcel) AddDelegationToken(token core.DelegationToken)

func (*Parcel) AllowedSenderObjectAndRole added in v0.7.5

func (p *Parcel) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*Parcel) Context added in v0.6.3

func (sm *Parcel) Context(ctx context.Context) context.Context

Context returns initialized context with propagated data with ctx as parent.

func (*Parcel) DefaultRole added in v0.7.5

func (p *Parcel) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*Parcel) DefaultTarget added in v0.7.5

func (p *Parcel) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*Parcel) DelegationToken added in v0.6.3

func (sm *Parcel) DelegationToken() core.DelegationToken

func (*Parcel) GetCaller added in v0.6.3

func (sm *Parcel) GetCaller() *core.RecordRef

GetCaller returns initiator of this event.

func (*Parcel) GetSender added in v0.6.3

func (sm *Parcel) GetSender() core.RecordRef

func (*Parcel) GetSign added in v0.6.3

func (sm *Parcel) GetSign() []byte

func (*Parcel) Message added in v0.6.3

func (sm *Parcel) Message() core.Message

Message returns current instance's message

func (*Parcel) Pulse added in v0.7.5

func (sm *Parcel) Pulse() core.PulseNumber

Pulse returns pulse, when parcel was sent

func (*Parcel) Type added in v0.6.3

func (sm *Parcel) Type() core.MessageType

Type returns message type.

type ParcelFactory added in v0.6.3

type ParcelFactory interface {
	Create(context.Context, core.Message, core.RecordRef, core.DelegationToken, core.Pulse) (core.Parcel, error)
	Validate(crypto.PublicKey, core.Parcel) error
}

ParcelFactory is used for creating parcels

type PendingFinished added in v0.7.5

type PendingFinished struct {
	Reference core.RecordRef // object pended in executor
}

PendingFinished is sent by the old executor to the current executor when pending execution finishes.

func (*PendingFinished) AllowedSenderObjectAndRole added in v0.7.5

func (pf *PendingFinished) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

func (*PendingFinished) DefaultRole added in v0.7.5

func (pf *PendingFinished) DefaultRole() core.DynamicRole

func (*PendingFinished) DefaultTarget added in v0.7.5

func (pf *PendingFinished) DefaultTarget() *core.RecordRef

func (*PendingFinished) GetCaller added in v0.7.5

func (pf *PendingFinished) GetCaller() *core.RecordRef

func (*PendingFinished) Type added in v0.7.5

func (pf *PendingFinished) Type() core.MessageType

type PendingState added in v0.7.5

type PendingState int
const (
	PendingUnknown PendingState = iota
	NotPending
	InPending
)

type RegisterChild added in v0.5.0

type RegisterChild struct {
	Record []byte
	Parent core.RecordRef
	Child  core.RecordRef
	AsType *core.RecordRef // If not nil, considered as delegate.
	// contains filtered or unexported fields
}

RegisterChild amends object.

func (*RegisterChild) AllowedSenderObjectAndRole added in v0.7.5

func (m *RegisterChild) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*RegisterChild) DefaultRole added in v0.7.5

func (*RegisterChild) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*RegisterChild) DefaultTarget added in v0.7.5

func (m *RegisterChild) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (RegisterChild) GetCaller added in v0.5.0

func (RegisterChild) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*RegisterChild) Type added in v0.5.0

func (*RegisterChild) Type() core.MessageType

Type implementation of Message interface.

type ReturnResults added in v0.7.5

type ReturnResults struct {
	Target   core.RecordRef
	Caller   core.RecordRef
	Sequence uint64
	Reply    core.Reply
	Error    string
}

ReturnResults - push results of methods

func (*ReturnResults) AllowedSenderObjectAndRole added in v0.7.5

func (rr *ReturnResults) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

func (*ReturnResults) DefaultRole added in v0.7.5

func (rr *ReturnResults) DefaultRole() core.DynamicRole

func (*ReturnResults) DefaultTarget added in v0.7.5

func (rr *ReturnResults) DefaultTarget() *core.RecordRef

func (*ReturnResults) GetCaller added in v0.7.5

func (rr *ReturnResults) GetCaller() *core.RecordRef

func (*ReturnResults) Type added in v0.7.5

func (rr *ReturnResults) Type() core.MessageType

type SaveAs added in v0.5.0

type SaveAs int
const (
	Child SaveAs = iota
	Delegate
)

type SetBlob added in v0.6.2

type SetBlob struct {
	TargetRef core.RecordRef
	Memory    []byte
	// contains filtered or unexported fields
}

SetBlob saves blob in storage.

func (*SetBlob) AllowedSenderObjectAndRole added in v0.7.5

func (m *SetBlob) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*SetBlob) DefaultRole added in v0.7.5

func (*SetBlob) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*SetBlob) DefaultTarget added in v0.7.5

func (m *SetBlob) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (SetBlob) GetCaller added in v0.6.2

func (SetBlob) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*SetBlob) Type added in v0.6.2

func (*SetBlob) Type() core.MessageType

Type implementation of Message interface.

type SetRecord added in v0.6.1

type SetRecord struct {
	Record    []byte
	TargetRef core.RecordRef
	// contains filtered or unexported fields
}

SetRecord saves record in storage.

func (*SetRecord) AllowedSenderObjectAndRole added in v0.7.5

func (m *SetRecord) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*SetRecord) DefaultRole added in v0.7.5

func (*SetRecord) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*SetRecord) DefaultTarget added in v0.7.5

func (m *SetRecord) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (SetRecord) GetCaller added in v0.6.1

func (SetRecord) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*SetRecord) Type added in v0.6.1

func (m *SetRecord) Type() core.MessageType

Type implementation of Message interface.

type StillExecuting added in v0.7.5

type StillExecuting struct {
	Reference core.RecordRef // object we still executing
}

StillExecuting

func (*StillExecuting) AllowedSenderObjectAndRole added in v0.7.5

func (se *StillExecuting) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

func (*StillExecuting) DefaultRole added in v0.7.5

func (se *StillExecuting) DefaultRole() core.DynamicRole

func (*StillExecuting) DefaultTarget added in v0.7.5

func (se *StillExecuting) DefaultTarget() *core.RecordRef

func (*StillExecuting) GetCaller added in v0.7.5

func (se *StillExecuting) GetCaller() *core.RecordRef

func (*StillExecuting) Type added in v0.7.5

func (se *StillExecuting) Type() core.MessageType

type UpdateObject

type UpdateObject struct {
	Record []byte
	Object core.RecordRef
	Memory []byte
	// contains filtered or unexported fields
}

UpdateObject amends object.

func (*UpdateObject) AllowedSenderObjectAndRole added in v0.7.5

func (m *UpdateObject) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*UpdateObject) DefaultRole added in v0.7.5

func (*UpdateObject) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*UpdateObject) DefaultTarget added in v0.7.5

func (m *UpdateObject) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (UpdateObject) GetCaller

func (UpdateObject) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*UpdateObject) Type

func (*UpdateObject) Type() core.MessageType

Type implementation of Message interface.

type ValidateCaseBind added in v0.6.0

type ValidateCaseBind struct {
	Caller    core.RecordRef
	RecordRef core.RecordRef
	Requests  []CaseBindRequest
	Pulse     core.Pulse
}

func (*ValidateCaseBind) AllowedSenderObjectAndRole added in v0.7.5

func (vcb *ValidateCaseBind) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*ValidateCaseBind) DefaultRole added in v0.7.5

func (*ValidateCaseBind) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*ValidateCaseBind) DefaultTarget added in v0.7.5

func (vcb *ValidateCaseBind) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*ValidateCaseBind) GetCaller added in v0.6.0

func (vcb *ValidateCaseBind) GetCaller() *core.RecordRef

TODO change after changing pulsar

func (*ValidateCaseBind) GetPulse added in v0.6.0

func (vcb *ValidateCaseBind) GetPulse() core.Pulse

func (*ValidateCaseBind) GetReference added in v0.6.0

func (vcb *ValidateCaseBind) GetReference() core.RecordRef

func (*ValidateCaseBind) Type added in v0.6.0

func (vcb *ValidateCaseBind) Type() core.MessageType

type ValidateRecord added in v0.6.2

type ValidateRecord struct {
	Object             core.RecordRef
	State              core.RecordID
	IsValid            bool
	ValidationMessages []core.Message
	// contains filtered or unexported fields
}

ValidateRecord creates VM validation for specific object record.

func (*ValidateRecord) AllowedSenderObjectAndRole added in v0.7.5

func (m *ValidateRecord) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*ValidateRecord) DefaultRole added in v0.7.5

func (*ValidateRecord) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*ValidateRecord) DefaultTarget added in v0.7.5

func (m *ValidateRecord) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (ValidateRecord) GetCaller added in v0.6.2

func (ValidateRecord) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*ValidateRecord) Type added in v0.6.2

Type implementation of Message interface.

type ValidationCheck added in v0.7.5

type ValidationCheck struct {
	Object              core.RecordRef
	ValidatedState      core.RecordID
	LatestStateApproved *core.RecordID
	// contains filtered or unexported fields
}

ValidationCheck checks if validation of a particular record can be performed.

func (*ValidationCheck) AllowedSenderObjectAndRole added in v0.7.5

func (m *ValidationCheck) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*ValidationCheck) DefaultRole added in v0.7.5

func (m *ValidationCheck) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*ValidationCheck) DefaultTarget added in v0.7.5

func (m *ValidationCheck) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (ValidationCheck) GetCaller added in v0.7.5

func (ValidationCheck) GetCaller() *core.RecordRef

GetCaller implementation of Message interface.

func (*ValidationCheck) Type added in v0.7.5

Type implementation of Message interface.

type ValidationResults added in v0.6.0

type ValidationResults struct {
	Caller           core.RecordRef
	RecordRef        core.RecordRef
	PassedStepsCount int
	Error            string
}

func (*ValidationResults) AllowedSenderObjectAndRole added in v0.7.5

func (vr *ValidationResults) AllowedSenderObjectAndRole() (*core.RecordRef, core.DynamicRole)

AllowedSenderObjectAndRole implements interface method

func (*ValidationResults) DefaultRole added in v0.7.5

func (*ValidationResults) DefaultRole() core.DynamicRole

DefaultRole returns role for this event

func (*ValidationResults) DefaultTarget added in v0.7.5

func (vr *ValidationResults) DefaultTarget() *core.RecordRef

DefaultTarget returns of target of this event.

func (*ValidationResults) GetCaller added in v0.6.0

func (vr *ValidationResults) GetCaller() *core.RecordRef

TODO change after changing pulsar

func (*ValidationResults) GetReference added in v0.6.0

func (vr *ValidationResults) GetReference() core.RecordRef

func (*ValidationResults) Type added in v0.6.0

func (vr *ValidationResults) Type() core.MessageType

Jump to

Keyboard shortcuts

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