Documentation ¶
Index ¶
- Variables
- func BackgroundLogging(ctx context.Context)
- func Close(ctx context.Context)
- func GetSender(ctx context.Context, fn string) (send.Sender, error)
- func LoadTraceProvider(ctx context.Context, collectorEndpoint string, sampleRatio float64) error
- func NewLogkeeper(opts LogkeeperOptions) *logkeeper
- func NewPProfSvc() *pprofsvc
- type ColorDef
- type ColorSet
- type LimitedReader
- type Logger
- type LogkeeperOptions
- type MutableVar
Constants ¶
This section is empty.
Variables ¶
var BuildRevision = "-dev"
BuildRevision 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 BackgroundLogging ¶
func LoadTraceProvider ¶
func NewLogkeeper ¶
func NewLogkeeper(opts LogkeeperOptions) *logkeeper
NewLogkeeper returns a new Logkeeper REST service with the given options.
func NewPProfSvc ¶
func NewPProfSvc() *pprofsvc
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 returns ErrReadSizeLimitExceeded so it can be distinguished from a normal EOF.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a middleware handler that aggregates statistics on responses. Route statistics are periodically logged. If a handler panics Logger will recover the panic and log its error.
type LogkeeperOptions ¶
type LogkeeperOptions struct { // URL is the base URL to append to relative paths. URL string // MaxRequestSize is the maximum allowable request size. MaxRequestSize int }
LogkeeperOptions represents the set of options for creating a new Logkeeper REST service.
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{}