github.com/

directory
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2014 License: Apache-2.0

Directories

Path Synopsis
google
go-github/github
Package github provides a client for using the GitHub API.
Package github provides a client for using the GitHub API.
go-querystring/query
Package query implements encoding of structs into URL query parameters.
Package query implements encoding of structs into URL query parameters.
gorilla
context
Package context stores values shared during a request lifetime.
Package context stores values shared during a request lifetime.
mux
Package gorilla/mux implements a request router and dispatcher.
Package gorilla/mux implements a request router and dispatcher.
marpaia
chef-golang
This is a Go client for Opscode's Chef.
This is a Go client for Opscode's Chef.
graphite-golang
Example of using the graphiteNop feature in action: package mylib import ( "github.com/marpaia/graphite-golang" "log" ) func init() { // load your configuration file / mechanism config := newConfig() // try to connect a graphite server if config.GraphiteEnabled { Graphite, err = graphite.NewGraphite(config.Graphite.Host, config.Graphite.Port) } else { Graphite = graphite.NewGraphiteNop(config.Graphite.Host, config.Graphite.Port) } // if you couldn't connect to graphite, use a nop if err != nil { Graphite = graphite.NewGraphiteNop(config.Graphite.Host, config.Graphite.Port) } log.Printf("Loaded Graphite connection: %#v", Graphite) Graphite.SimpleSend("stats.graphite_loaded", 1) } func doWork() { // this will work just fine, regardless of if you're working with a graphite // nop or not Graphite.SimpleSend("stats.doing_work", 1) }
Example of using the graphiteNop feature in action: package mylib import ( "github.com/marpaia/graphite-golang" "log" ) func init() { // load your configuration file / mechanism config := newConfig() // try to connect a graphite server if config.GraphiteEnabled { Graphite, err = graphite.NewGraphite(config.Graphite.Host, config.Graphite.Port) } else { Graphite = graphite.NewGraphiteNop(config.Graphite.Host, config.Graphite.Port) } // if you couldn't connect to graphite, use a nop if err != nil { Graphite = graphite.NewGraphiteNop(config.Graphite.Host, config.Graphite.Port) } log.Printf("Loaded Graphite connection: %#v", Graphite) Graphite.SimpleSend("stats.graphite_loaded", 1) } func doWork() { // this will work just fine, regardless of if you're working with a graphite // nop or not Graphite.SimpleSend("stats.doing_work", 1) }
xanzy

Jump to

Keyboard shortcuts

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