Navigation Menu

Skip to content

cjgdev/gorymartini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoryMartini

Riemann middleware for martini framework.

Logs the following information:

  • The time the request took
  • The http status code
  • The requested path

Installation

To install the package for use in your own programs:

go get github.com/bigdatadev/goryman
go get github.com/bigdatadev/gorymartini

Getting Started

First we'll need to import the library:

import (
    "github.com/bigdatadev/goryman"
    "github.com/bigdatadev/gorymartini"
	"github.com/go-martini/martini"
)

Next we'll need to create the client and martini handler:

c, h := gorymartini.NewGoryMartini("localhost:5555")
err := c.Connect()
if c == nil || h == nil {
    panic(err)
}

Don't forget to close the client connection when you're done:

defer c.Close()

Now we simply need to use the handler:

m := martini.New()
// ...
m.Use(h)
m.Run()

Contributing

Just send me a pull request. Please take a look at the project issues and see how you can help. Here are some tips:

  • please add more tests.
  • please check your syntax.

Author

Christopher Gilbert

Copyright

See LICENSE document

About

Riemann middleware for martini framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages