mithril

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2013 License: MIT Imports: 13 Imported by: 1

README

mithril

Build Status

HTTP -> AMQP proxy layer

Development

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.

Troubleshooting
command not found: gvm

If the build fails because gvm cannot be found, you can silence the error by creating the following symlink (although use of gvm is encouraged, as this is what is used on Travis CI):

pwd
# => /Users/jdoe/workspace/mithril
ln -s $PWD ${GOPATH%%:*}/src/mithril

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

func ProgVersion

func ProgVersion() string

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 Configuration

type Configuration struct {
	DisplayVersion bool
	DisplayRev     bool
	PidFile        string
	EnableDebug    bool
	ServerAddress  string
	Storage        string
	StorageUri     string
	AmqpUri        string
	ShowStorage    bool
	ExitImmediate  bool
}

func NewConfigurationFromFlags

func NewConfigurationFromFlags() *Configuration

type Server

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

func NewServer

func NewServer(configuration *Configuration) (*Server, error)

func (*Server) Serve

func (me *Server) Serve()

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