reporters

package
v0.0.0-...-80f8fd8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	Reporter
}

Log is a reporter that logs via Report

func (*Log) Report

func (r *Log) Report(hit *parser.ParsedLogLine)

Report logs the parsed log line

type Redis

type Redis struct {
	Reporter
	// contains filtered or unexported fields
}

Redis is a reporter that publishes hit statues to redis The address of the redis server to be published can be controlled using the REDIS_ADDRESS env (defaults to "localhost:6379") Setting the optional REDIS_PASSWORD env will cause the client to AUTH using that password on connection

func (*Redis) Report

func (r *Redis) Report(hit *parser.ParsedLogLine)

Report publishes the parsed log lines status code to redis

type Reporter

type Reporter interface {
	Report(hit *parser.ParsedLogLine)
	// contains filtered or unexported methods
}

Reporter interface To be a reporter, you must implement Report, taking a parser.ParsedLogLine

func New

func New(t string) (Reporter, error)

New creates a new Reporter of specified type and initializes it

Jump to

Keyboard shortcuts

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