trace

package
v0.0.0-...-7b8bf0e Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const SyslogPrefix = "@cee: "
View Source
const SyslogTag = "pid"
View Source
const Type = "trace"

Variables

This section is empty.

Functions

func CliFlags

func CliFlags() []cli.Flag

CliFlags is used to add command-line arguments to the CLI tool - vctl

func FromCli

func FromCli(c *cli.Context) (plugin.Middleware, error)

FromCli creates a Trace plugin object from command line

func FromOther

func FromOther(t Trace) (plugin.Middleware, error)

FromOther creates and validates Trace plugin instance from serialized format

func GetSpec

func GetSpec() *plugin.MiddlewareSpec

GetSpec returns all information neccessary for Vulcand to plugin this extension

Types

type Trace

type Trace struct {
	// ReqHeaders - request headers to capture
	ReqHeaders []string
	// RespHeaders - response headers to capture
	RespHeaders []string
	// Address in format syslog://host:port or syslog:///path/socket.sock
	Addr string
}

Trace plugin emits structured logs to syslog facility

func New

func New(addr string, reqHeaders, respHeaders []string) (*Trace, error)

New returns a new Trace plugin

func (*Trace) NewHandler

func (t *Trace) NewHandler(next http.Handler) (http.Handler, error)

NewHandler creates a new http.Handler middleware

func (*Trace) String

func (t *Trace) String() string

String is a user-friendly representation of the handler

Jump to

Keyboard shortcuts

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