bus

package
v0.0.0-...-3fe642c Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFowarder

func NewFowarder(
	bus MessageQueue,
	eventTypes []string,
) eventmanager.Subscriber

NewFowarder fowards all voting events to a message queue.

Types

type Envelope

type Envelope struct {
	Header Header           `json:"header,omitempty"`
	Body   *json.RawMessage `json:"body,omitempty"`
}

Envelope wraps a before sending it across the wire

type Header map[string]string

Header simple dictionary of string keys string values for housing message meta-data

type Message

type Message interface {
	Event() eventstore.Event
	Header() Header
}

Message is passed back to recieved and expected to go back to Ack or Nak

type MessageQueue

type MessageQueue interface {
	Receive() (Message, error)
	Ack(Message) error
	Nack(Message) error
	Send(eventstore.Event) error
}

MessageQueue send and retreive events ove a message queue

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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