Documentation ¶
Index ¶
- Variables
- func GetCtxRequestId(req *http.Request) int
- func GetSender(fn string) (send.Sender, error)
- func MergeLog(logger1 chan *LogLineItem, logger2 chan *LogLineItem) chan *LogLineItem
- func New(session *mgo.Session, opts Options) *logKeeper
- func SetCtxRequestId(reqId int, req *http.Request)
- type ColorDef
- type ColorSet
- type LimitedReader
- type Log
- type LogKeeperBuild
- type LogLine
- type LogLineItem
- type Logger
- type MutableVar
- type Options
- type Test
Constants ¶
This section is empty.
Variables ¶
var BuildRevision = "-dev"
Should be specified with -ldflags at build time
var Colors = []string{"#333", "seagreen", "steelblue",
"mediumpurple", "crimson", "darkkhaki",
"darkgreen", "rosybrown", "chocolate",
"orangered", "darkseagreen", "royalblue",
"slategray",
}
var ErrReadSizeLimitExceeded = errors.New("read size limit exceeded")
Functions ¶
func GetCtxRequestId ¶
func MergeLog ¶
func MergeLog(logger1 chan *LogLineItem, logger2 chan *LogLineItem) chan *LogLineItem
MergeLog takes two channels of LogLineItem and returns a single channel that feeds the result of merging the two input channels sorted by timestamp.
func SetCtxRequestId ¶
Types ¶
type ColorSet ¶
type ColorSet struct {
// contains filtered or unexported fields
}
ColorSet is a structure to track unique logger names and assign a color number to each one.
func NewColorSet ¶
func NewColorSet() *ColorSet
func (*ColorSet) GetAllColors ¶
GetAllColors returns a list of all the ColorDef entries stored internally, where each ColorDef is composed of a name and actual HTML color value.
type LimitedReader ¶
A LimitedReader reads from R but limits the amount of data returned to just N bytes. Each call to Read updates N to reflect the new amount remaining. Note: this is identical to io.LimitedReader, but throws ErrReadSizeLimitExceeded so it can be distinguished from a normal EOF.
type LogKeeperBuild ¶
type LogLine ¶
type LogLine []interface{}
func NewLogLine ¶
func NewLogLine(data []interface{}) *LogLine
type LogLineItem ¶
func (*LogLineItem) Color ¶
func (self *LogLineItem) Color() string
func (LogLineItem) Global ¶
func (lli LogLineItem) Global() bool
Global returns true if this log line comes from a global log, otherwise false (from a test log).
func (*LogLineItem) OlderThanThreshold ¶
func (self *LogLineItem) OlderThanThreshold(previousItem interface{}) bool
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a middleware handler that logs the request as it goes in and the response as it goes out.
func (*Logger) ServeHTTP ¶
func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
type MutableVar ¶
type MutableVar struct {
Value interface{}
}
func (*MutableVar) Get ¶
func (self *MutableVar) Get() interface{}
func (*MutableVar) Set ¶
func (self *MutableVar) Set(v interface{}) interface{}
type Test ¶
type Test struct { Id bson.ObjectId `bson:"_id"` BuildId interface{} `bson:"build_id"` BuildName string `bson:"build_name"` Name string `bson:"name"` Command string `bson:"command"` Started time.Time `bson:"started"` Ended *time.Time `bson:"ended"` Info map[string]interface{} `bson:"info"` Failed bool `bson:"failed"` Phase string `bson:"phase"` Seq int `bson:"seq"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Archive Provides a single "MakeTarball" function to create tar (tar.gz) archives.
|
Archive Provides a single "MakeTarball" function to create tar (tar.gz) archives. |
vendoring
Package vendoring provides a several variables used in vendoring buildscripts and function that reports (without any external dependencies) if the current environment requires legacy-style vendoring, or if its safe to use new-style vendoring.
|
Package vendoring provides a several variables used in vendoring buildscripts and function that reports (without any external dependencies) if the current environment requires legacy-style vendoring, or if its safe to use new-style vendoring. |