microbrew

package module
v0.0.0-...-1c8b67b Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2015 License: MIT Imports: 4 Imported by: 0

README

microbrew.go

A Microservices toolkit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailOnError

func FailOnError(err error, msg string)

Types

type Agent

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

func NewAgent

func NewAgent(uri, exchange, exchangeType string) *Agent

func NewAgentForProducer

func NewAgentForProducer(producer MicrobrewProducer) *Agent

func (*Agent) Signal

func (a *Agent) Signal(event string, data interface{}) error

type MicrobrewAgent

type MicrobrewAgent interface {
	Signal(event string, data interface{}) error
}

type MicrobrewProducer

type MicrobrewProducer interface {
	Publish(routingKey string, payload *Payload) error
}

type Payload

type Payload struct {
	Event string      `json:"event"`
	Data  interface{} `json:"data"`
}

type Producer

type Producer struct {
	Conn    *amqp.Connection
	Channel *amqp.Channel
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(uri, exchange, exchangeType string) *Producer

func (*Producer) Publish

func (p *Producer) Publish(routingKey string, payload *Payload) error

Directories

Path Synopsis
Godeps
_workspace/src/github.com/streadway/amqp
AMQP 0.9.1 client with RabbitMQ extensions Understand the AMQP 0.9.1 messaging model by reviewing these links first.
AMQP 0.9.1 client with RabbitMQ extensions Understand the AMQP 0.9.1 messaging model by reviewing these links first.
_workspace/src/github.com/stretchr/objx
objx - Go package for dealing with maps, slices, JSON and other data.
objx - Go package for dealing with maps, slices, JSON and other data.
_workspace/src/github.com/stretchr/testify/assert
A set of comprehensive testing tools for use with the normal Go testing system.
A set of comprehensive testing tools for use with the normal Go testing system.
_workspace/src/github.com/stretchr/testify/mock
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.
Provides a system by which it is possible to mock your objects and verify calls are happening as expected.

Jump to

Keyboard shortcuts

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