Documentation ¶
Index ¶
- Variables
- func Error(format string, args ...interface{}) error
- func Info(format string, args ...interface{})
- func Init(c Configuration) error
- func MetricDuration(stat string, delta time.Duration)
- func MetricDurationWithTags(stat string, delta time.Duration, tags map[string]string)
- func MetricGauge(stat string, value int64)
- func MetricGaugeWithTags(stat string, value int64, tags map[string]string)
- func MetricInc(stat string, value int64)
- func MetricIncByOne(stat string)
- func MetricIncByOneWithTags(stat string, tags map[string]string)
- func MetricIncWithTags(stat string, value int64, tags map[string]string)
- func Slack(channel string, format string, args ...interface{})
- func Stop()
- func Warning(format string, args ...interface{})
- type Configuration
- type LoggerConfiguration
- type MetricConfiguration
- type MetricTimer
- type SlackConfiguration
Constants ¶
This section is empty.
Variables ¶
View Source
var GitTag string
Functions ¶
func Init ¶
func Init(c Configuration) error
func MetricDuration ¶
func MetricDurationWithTags ¶
func MetricGauge ¶
func MetricGaugeWithTags ¶
func MetricIncByOne ¶
func MetricIncByOne(stat string)
func MetricIncByOneWithTags ¶
Types ¶
type Configuration ¶
type Configuration struct { AppName string `json:"app_name"` Logger *LoggerConfiguration `json:"logger"` Metric *MetricConfiguration `json:"metric"` Slack *SlackConfiguration `json:"slack"` }
type LoggerConfiguration ¶
type MetricConfiguration ¶
type MetricTimer ¶
type MetricTimer struct {
// contains filtered or unexported fields
}
func NewMetricTimer ¶
func NewMetricTimer() *MetricTimer
func (*MetricTimer) Stop ¶
func (t *MetricTimer) Stop(stat string)
func (*MetricTimer) StopWithTags ¶
func (t *MetricTimer) StopWithTags(stat string, tags map[string]string)
type SlackConfiguration ¶
type SlackConfiguration struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.