Documentation ¶
Index ¶
- Constants
- Variables
- func AddAppPayloadFn(key string, fn func() interface{})
- func CurrentTime() time.Time
- func GetStatPrefix() string
- func HandleOther(w http.ResponseWriter, r *http.Request)
- func HandleStats(w http.ResponseWriter, r *http.Request)
- func NewLogLevelFromString(s string) logLevel
- func RegisterStatsHandlers()
- func ResetStats(w http.ResponseWriter, r *http.Request)
- func SetAddress(addr string)
- func SetInfo(name string, ver string, com string)
- func StartStatsServer(addr string)
- type Configuration
- func (c *Configuration) Get(key string, defaultValue ...string) (string, bool)
- func (c *Configuration) GetAll() map[string]string
- func (c *Configuration) GetBool(key string, defaultValue ...bool) bool
- func (c *Configuration) GetContext() string
- func (c *Configuration) GetDuration(key string, defaultValue ...time.Duration) (time.Duration, error, bool)
- func (c *Configuration) GetInt(key string, defaultValue ...int) (int, bool)
- func (c *Configuration) GetMulti(key string, sep string, defaultValue ...[]string) ([]string, bool)
- func (c *Configuration) GetURL(key string, defaultValue ...string) (*url.URL, error, bool)
- func (c *Configuration) Requested() string
- func (c *Configuration) Set(key string, value string) string
- func (c *Configuration) Stats() string
- func (c *Configuration) Unset(key string) string
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(msg string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) ErrorWithStack(msg string, args ...interface{})
- func (l *Logger) Errorf(msg string, args ...interface{})
- func (l *Logger) Fatal(args ...interface{})
- func (l *Logger) Fatalf(msg string, args ...interface{})
- func (l *Logger) GetLogLevel() logLevel
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(msg string, args ...interface{})
- func (l *Logger) LogLevel() int
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) Panicf(msg string, args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(msg string, args ...interface{})
- type Stat
Constants ¶
View Source
const ( DEBUG logLevel = iota INFO WARN ERROR FATAL PANIC )
Variables ¶
View Source
var ( RootStat = &Stat{ key: "root", ignoreChildUpdates: true, } )
Functions ¶
func AddAppPayloadFn ¶ added in v1.0.33
func AddAppPayloadFn(key string, fn func() interface{})
func CurrentTime ¶ added in v1.0.51
func GetStatPrefix ¶ added in v1.0.48
func GetStatPrefix() string
func HandleOther ¶ added in v1.0.47
func HandleOther(w http.ResponseWriter, r *http.Request)
func HandleStats ¶ added in v1.0.47
func HandleStats(w http.ResponseWriter, r *http.Request)
func NewLogLevelFromString ¶ added in v1.0.24
func NewLogLevelFromString(s string) logLevel
func RegisterStatsHandlers ¶ added in v1.0.55
func RegisterStatsHandlers()
func ResetStats ¶ added in v1.0.47
func ResetStats(w http.ResponseWriter, r *http.Request)
func StartStatsServer ¶
func StartStatsServer(addr string)
Types ¶
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
Configuration comment
func (*Configuration) Get ¶
func (c *Configuration) Get(key string, defaultValue ...string) (string, bool)
func (*Configuration) GetAll ¶ added in v1.0.40
func (c *Configuration) GetAll() map[string]string
func (*Configuration) GetBool ¶
func (c *Configuration) GetBool(key string, defaultValue ...bool) bool
GetBool comment
func (*Configuration) GetContext ¶ added in v1.0.36
func (c *Configuration) GetContext() string
Get context
func (*Configuration) GetDuration ¶ added in v1.0.58
func (*Configuration) GetInt ¶
func (c *Configuration) GetInt(key string, defaultValue ...int) (int, bool)
GetInt comment
func (*Configuration) Requested ¶ added in v1.0.41
func (c *Configuration) Requested() string
func (*Configuration) Set ¶
func (c *Configuration) Set(key string, value string) string
Set an item in the config
func (*Configuration) Unset ¶
func (c *Configuration) Unset(key string) string
Unset removes an item from the config
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger comment
func (*Logger) ErrorWithStack ¶
ErrorWithStack comment
func (*Logger) GetLogLevel ¶ added in v1.0.24
func (l *Logger) GetLogLevel() logLevel
type Stat ¶
type Stat struct {
// contains filtered or unexported fields
}
Stat comment
func (*Stat) AddTimeForRange ¶ added in v1.0.61
Click to show internal directories.
Click to hide internal directories.