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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址