mithril

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2014 License: MIT Imports: 8 Imported by: 1

README

mithril

Build Status

HTTP -> AMQP proxy layer

Development

RabbitMQ is required. Reommended method of installation is Homebrew

brew install rabbitmq

Create the mithril_test database

createdb mithril_test

If you don't have RabbitMQ launched by default

rabbitmq-server

The build/test cycle uses make and should not require specification of a specific target:

make

This will execute the all target, which cleans, builds, runs Go tests, and runs the black-box golden suite. Once some of the more expensive one-time prerequisites are out of the way, the cycle should be between 3-7 seconds. If your build cycle is taking considerably longer, please file an issue.

A docker image exists for this application on docker.io's registry https://registry.hub.docker.com/u/modcloth/mithril/.

CI

Tagging this repo will cause Travis CI to queue a build of the Dockerfile on docker.io on successful build. This build will be tagged as latest.

Troubleshooting

In order to test the PostgreSQL integration, you will also have to have a PostgreSQL server available. The default URI used by the tests is the following, which requires the presence of a mithril_test database:

postgres://localhost/mithril_test?sslmode=disable

You may specify your own URI via the $MITHRIL_PG_URI env var, e.g.:

export MITHRIL_PG_URI='postgres://postgres@localhost?sslmode=disable'
no such file to load -- minitest/spec (LoadError) or syntax error, unexpected ':', expecting ')'

Your Ruby interpreter is too old 😸. The test suite uses minitest from the Ruby standard library as of version 1.9. If you install either rvm or rbenv, they should detect the presence of the .ruby-version file and instruct you accordingly (or explosively).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the `git describe` string embedded via ldflags
	Version string
	// Rev is the `git rev-parse` string embedded via ldflags
	Rev string
)

Functions

This section is empty.

Types

type AMQPPublisher

type AMQPPublisher struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewAMQPPublisher

func NewAMQPPublisher(amqpUri string) (*AMQPPublisher, error)

func (*AMQPPublisher) Publish

func (me *AMQPPublisher) Publish(req *message.Message) error

type Server

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

func NewServer

func NewServer(storer *store.Storage, amqp *AMQPPublisher) *Server

func (*Server) ServeHTTP

func (me *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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