messagerouter

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: 6 Imported by: 0

Documentation

Overview

Package messagerouter routes messages (contract calls & responses) and delivers'em to relevant modules.

Usage:

TODO:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeResponse added in v0.0.4

func DeserializeResponse(data []byte) (res core.Response, err error)

DeserializeResponse reads response from byte slice.

func Serialize added in v0.0.4

func Serialize(value interface{}) ([]byte, error)

Serialize converts Message or Response to byte slice.

Types

type MessageRouter

type MessageRouter struct {
	LogicRunner core.LogicRunner
	// contains filtered or unexported fields
}

MessageRouter is component that routes application logic requests, e.g. glue between network and logic runner

func New

New is a `MessageRouter` constructor, takes an executor object that satisfies `LogicRunner` interface

func (*MessageRouter) Route

func (mr *MessageRouter) Route(msg core.Message) (response core.Response, err error)

Route a `Message` and get a `Response` or error from remote host

func (*MessageRouter) Start added in v0.0.6

func (mr *MessageRouter) Start(c core.Components) error

func (*MessageRouter) Stop added in v0.0.6

func (mr *MessageRouter) Stop() error

Directories

Path Synopsis
Package message represents message that messagerouter can route
Package message represents message that messagerouter can route

Jump to

Keyboard shortcuts

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