messagebus

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package messagebus 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

This section is empty.

Types

type MessageBus

type MessageBus struct {
	// contains filtered or unexported fields
}

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

func NewMessageBus

func NewMessageBus(configuration.Configuration) (*MessageBus, error)

NewMessageBus is a `MessageBus` constructor

func (*MessageBus) MustRegister added in v0.5.0

func (mb *MessageBus) MustRegister(p core.MessageType, handler core.MessageHandler)

MustRegister is a Register wrapper that panics if an error was returned.

func (*MessageBus) Register

func (mb *MessageBus) Register(p core.MessageType, handler core.MessageHandler) error

Register sets a function as a hadler for particular message type, only one handler per type is allowed

func (*MessageBus) Send

func (mb *MessageBus) Send(msg core.Message) (core.Reply, error)

Send an `Message` and get a `Reply` or error from remote host.

func (*MessageBus) SendAsync

func (mb *MessageBus) SendAsync(msg core.Message)

SendAsync sends a `Message` to remote host.

func (*MessageBus) Start

func (mb *MessageBus) Start(c core.Components) error

Start initializes message bus

func (*MessageBus) Stop

func (mb *MessageBus) Stop() error

Stop releases resources and stops the bus

Jump to

Keyboard shortcuts

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