Skip to content

Middleware for Goji to track HTTP requests and responses on keen.io.

License

Notifications You must be signed in to change notification settings

philpearl/keengo_goji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#keengo goji

Middleware for Goji to track HTTP requests and responses on keen.io.

See the documentation at https://godoc.org/github.com/philpearl/keengo_goji

Build Status

Example

Here's how I use this middleware to track calls to my API.

package main

import (
        "fmt"
        "net/http"

        "github.com/philpearl/keengo_goji"

        "github.com/zenazn/goji"
        "github.com/zenazn/goji/web"
)

func hello(c web.C, w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "Hello, %s!", c.URLParams["name"])
}

func main() {
        goji.Use(keengo_goji.BuildMiddleWare("mykeenprojectID", "mykeenwritekey","requests", nil)
        goji.Get("/hello/:name", hello)
        goji.Serve()
}

About

Middleware for Goji to track HTTP requests and responses on keen.io.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages