Documentation ¶
Index ¶
- Variables
- func OnGCE() bool
- type Alerter
- type GCloudAlerter
- func (a *GCloudAlerter) Error(f string, arg ...interface{})
- func (a *GCloudAlerter) Info(f string, arg ...interface{})
- func (a *GCloudAlerter) LimitError(max time.Duration, f string, arg ...interface{})
- func (a *GCloudAlerter) LimitInfo(max time.Duration, f string, arg ...interface{})
- func (a *GCloudAlerter) LimitWarn(max time.Duration, f string, arg ...interface{})
- func (a *GCloudAlerter) Warn(f string, arg ...interface{})
- type LogrusAlerter
- func (a *LogrusAlerter) Error(f string, arg ...interface{})
- func (a *LogrusAlerter) Info(f string, arg ...interface{})
- func (a *LogrusAlerter) LimitError(max time.Duration, f string, arg ...interface{})
- func (a *LogrusAlerter) LimitInfo(max time.Duration, f string, arg ...interface{})
- func (a *LogrusAlerter) LimitWarn(max time.Duration, f string, arg ...interface{})
- func (a *LogrusAlerter) Warn(f string, arg ...interface{})
- type Null
- func (a *Null) Error(_ string, _ ...interface{})
- func (a *Null) Info(_ string, _ ...interface{})
- func (a *Null) LimitError(_ time.Duration, _ string, _ ...interface{})
- func (a *Null) LimitInfo(_ time.Duration, _ string, _ ...interface{})
- func (a *Null) LimitWarn(_ time.Duration, _ string, _ ...interface{})
- func (a *Null) Warn(_ string, _ ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // NullAlerter is blackhole alerter NullAlerter = &Null{} )
Functions ¶
Types ¶
type Alerter ¶
type Alerter interface { Info(f string, arg ...interface{}) Warn(f string, arg ...interface{}) Error(f string, arg ...interface{}) LimitWarn(max time.Duration, f string, arg ...interface{}) LimitInfo(max time.Duration, f string, arg ...interface{}) LimitError(max time.Duration, f string, arg ...interface{}) }
Alerter sends messages to the administrator
type GCloudAlerter ¶
type GCloudAlerter struct {
// contains filtered or unexported fields
}
GCloudAlerter sends alerts via Google Cloud Pub/Sub
func NewGCloud ¶
func NewGCloud(origin string, logger *logrus.Entry) (*GCloudAlerter, func(), error)
NewGCloud instance
func (*GCloudAlerter) Error ¶
func (a *GCloudAlerter) Error(f string, arg ...interface{})
Errorf implementation
func (*GCloudAlerter) Info ¶
func (a *GCloudAlerter) Info(f string, arg ...interface{})
Info implementation
func (*GCloudAlerter) LimitError ¶
func (a *GCloudAlerter) LimitError(max time.Duration, f string, arg ...interface{})
LimitError implementation
func (*GCloudAlerter) LimitInfo ¶
func (a *GCloudAlerter) LimitInfo(max time.Duration, f string, arg ...interface{})
LimitInfo implementation
func (*GCloudAlerter) LimitWarn ¶
func (a *GCloudAlerter) LimitWarn(max time.Duration, f string, arg ...interface{})
LimitWarn implementation
func (*GCloudAlerter) Warn ¶
func (a *GCloudAlerter) Warn(f string, arg ...interface{})
Warn implementation
type LogrusAlerter ¶
type LogrusAlerter struct {
// contains filtered or unexported fields
}
LogrusAlerter sends alerts to logrus logger
func (*LogrusAlerter) Error ¶
func (a *LogrusAlerter) Error(f string, arg ...interface{})
Error implementation
func (*LogrusAlerter) Info ¶
func (a *LogrusAlerter) Info(f string, arg ...interface{})
Info implementation
func (*LogrusAlerter) LimitError ¶
func (a *LogrusAlerter) LimitError(max time.Duration, f string, arg ...interface{})
LimitError implementation
func (*LogrusAlerter) LimitInfo ¶
func (a *LogrusAlerter) LimitInfo(max time.Duration, f string, arg ...interface{})
LimitInfo implementation
func (*LogrusAlerter) LimitWarn ¶
func (a *LogrusAlerter) LimitWarn(max time.Duration, f string, arg ...interface{})
LimitWarn implementation
func (*LogrusAlerter) Warn ¶
func (a *LogrusAlerter) Warn(f string, arg ...interface{})
Warn implementation
Click to show internal directories.
Click to hide internal directories.