gorelic

package module
v0.0.0-...-a58d425 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

README

go-workers-gorelic

NewRelic middleware for go-workers.

Usage

import(
  "github.com/jrallison/go-workers"
  "github.com/LYY/go-workers-gorelic"
)

func main(){
  workers.Configure(map[string]string{
    // location of redis instance
    "server":  "localhost:6379",
    // instance of the database
    "database":  "0",
    // number of connections to keep open with redis
    "pool":    "30",
    // unique process id for this instance of workers (for proper recovery of inprogress jobs on crash)
    "process": "1",
  })


  gorelic.InitNewrelicAgent("YOUR_NEWRELIC_LICENSE_KEY", "YOUR_APPLICATION_NAME", true)
  workers.Middleware.Append(&gorelic.GorelicMiddleware{})

  workers.Run()
}

Authors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitNewrelicAgent

func InitNewrelicAgent(license string, appname string, verbose bool) error

Types

type GorelicMiddleware

type GorelicMiddleware struct{}

func (*GorelicMiddleware) Call

func (r *GorelicMiddleware) Call(queue string, message *workers.Msg, next func() bool) (acknowledge bool)

Jump to

Keyboard shortcuts

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