message

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package message represents message that messagerouter can route

Index

Constants

View Source
const (
	CallMethodMessageType      // CallMethodMessage - Simply call method and return result
	CallConstructorMessageType // CallConstructorMessage is a message for calling constructor and obtain its response
	DelegateMessageType        // DelegateMessage is a message for injecting a delegate
)

Variables

This section is empty.

Functions

func Deserialize

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

Deserialize returns a message

Types

type CallConstructorMessage

type CallConstructorMessage struct {
	ClassRef  core.RecordRef
	Name      string
	Arguments core.Arguments
	// contains filtered or unexported fields
}

CallConstructorMessage is a message for calling constructor and obtain its response

func (*CallConstructorMessage) GetReference

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

GetReference implements core.Message

func (*CallConstructorMessage) Serialize

func (m *CallConstructorMessage) Serialize() (io.Reader, error)

Serialize serializes message

type CallMethodMessage

type CallMethodMessage struct {
	ObjectRef core.RecordRef
	Request   core.RecordRef
	Method    string
	Arguments core.Arguments
	// contains filtered or unexported fields
}

CallMethodMessage - Simply call method and return result

func (*CallMethodMessage) GetReference

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

GetReference implements core.Message

func (*CallMethodMessage) Serialize

func (m *CallMethodMessage) Serialize() (io.Reader, error)

GetReference implements core.Message

type DelegateMessage

type DelegateMessage struct {
	Into  core.RecordRef
	Class core.RecordRef
	Body  []byte
	// contains filtered or unexported fields
}

DelegateMessage is a message for saving contract's body as a delegate

func (*DelegateMessage) GetReference

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

GetReference implements core.Message

func (*DelegateMessage) Serialize

func (m *DelegateMessage) Serialize() (io.Reader, error)

Serialize serializes message

type MessageType

type MessageType byte

MessageType is a enum type of message

Jump to

Keyboard shortcuts

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