reply

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package reply represents responses to messages of the messagebus

Index

Constants

View Source
const (

	// TypeCommon - two binary fields: data and results.
	TypeCommon = core.ReplyType(iota)

	// TypeCode is code from storage.
	TypeCode
	// TypeClass is class from storage.
	TypeClass
	// TypeObject is object from storage.
	TypeObject
	// TypeDelegate is delegate reference from storage.
	TypeDelegate
	// TypeReference is common reply for methods returning reference to created records.
	TypeReference
)

Variables

This section is empty.

Functions

func Deserialize

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

Deserialize returns decoded reply.

func Serialize

func Serialize(reply core.Reply) (io.Reader, error)

Serialize returns encoded reply.

Types

type Class

type Class struct {
	Head  core.RecordRef
	State core.RecordRef
	Code  *core.RecordRef // Can be nil.
}

Class is class from storage.

func (*Class) Type

func (e *Class) Type() core.ReplyType

Type implementation of Reply interface.

type Code

type Code struct {
	Code        []byte
	MachineType core.MachineType
}

Code is code from storage.

func (*Code) Type

func (e *Code) Type() core.ReplyType

Type implementation of Reply interface.

type Common

type Common struct {
	Data   []byte
	Result []byte
}

Common - the most common reply

func (*Common) Type

func (r *Common) Type() core.ReplyType

Type returns type of the reply

type Delegate

type Delegate struct {
	Head core.RecordRef
}

Delegate is delegate reference from storage.

func (*Delegate) Type

func (e *Delegate) Type() core.ReplyType

Type implementation of Reply interface.

type Object

type Object struct {
	Head     core.RecordRef
	State    core.RecordRef
	Class    core.RecordRef
	Memory   []byte
	Children []core.RecordRef
}

Object is object from storage.

func (*Object) Type

func (e *Object) Type() core.ReplyType

Type implementation of Reply interface.

type Reference

type Reference struct {
	Ref core.RecordRef
}

Reference is common reaction for methods returning reference to created records.

func (*Reference) Type

func (e *Reference) Type() core.ReplyType

Type implementation of Reply interface.

Jump to

Keyboard shortcuts

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