Documentation ¶
Index ¶
- Variables
- func OnGCE() bool
- type Alerter
- type GCloudAlerter
- func (a *GCloudAlerter) Error(f string, arg ...interface{}) error
- func (a *GCloudAlerter) Info(f string, arg ...interface{}) error
- func (a *GCloudAlerter) LimitError(max time.Duration, f string, arg ...interface{}) error
- func (a *GCloudAlerter) LimitInfo(max time.Duration, f string, arg ...interface{}) error
- func (a *GCloudAlerter) LimitTagError(max time.Duration, tag, f string, arg ...interface{}) error
- func (a *GCloudAlerter) LimitTagInfo(max time.Duration, tag, f string, arg ...interface{}) error
- func (a *GCloudAlerter) LimitTagWarn(max time.Duration, tag, f string, arg ...interface{}) error
- func (a *GCloudAlerter) LimitWarn(max time.Duration, f string, arg ...interface{}) error
- func (a *GCloudAlerter) Warn(f string, arg ...interface{}) error
- type LogrusAlerter
- func (a *LogrusAlerter) Error(f string, arg ...interface{}) error
- func (a *LogrusAlerter) Info(f string, arg ...interface{}) error
- func (a *LogrusAlerter) LimitError(max time.Duration, f string, arg ...interface{}) error
- func (a *LogrusAlerter) LimitInfo(max time.Duration, f string, arg ...interface{}) error
- func (a *LogrusAlerter) LimitTagError(max time.Duration, tag, f string, arg ...interface{}) error
- func (a *LogrusAlerter) LimitTagInfo(max time.Duration, tag, f string, arg ...interface{}) error
- func (a *LogrusAlerter) LimitTagWarn(max time.Duration, tag, f string, arg ...interface{}) error
- func (a *LogrusAlerter) LimitWarn(max time.Duration, f string, arg ...interface{}) error
- func (a *LogrusAlerter) Warn(f string, arg ...interface{}) error
- type Null
- func (a *Null) Error(_ string, _ ...interface{}) error
- func (a *Null) Info(_ string, _ ...interface{}) error
- func (a *Null) LimitError(_ time.Duration, _ string, _ ...interface{}) error
- func (a *Null) LimitInfo(_ time.Duration, _ string, _ ...interface{}) error
- func (a *Null) LimitTagError(_ time.Duration, _, _ string, _ ...interface{}) error
- func (a *Null) LimitTagInfo(_ time.Duration, _, _ string, _ ...interface{}) error
- func (a *Null) LimitTagWarn(_ time.Duration, _, _ string, _ ...interface{}) error
- func (a *Null) LimitWarn(_ time.Duration, _ string, _ ...interface{}) error
- func (a *Null) Warn(_ string, _ ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
var ( // NullAlerter is blackhole alerter NullAlerter = &Null{} )
Functions ¶
Types ¶
type Alerter ¶
type Alerter interface { Info(f string, arg ...interface{}) error Warn(f string, arg ...interface{}) error Error(f string, arg ...interface{}) error LimitWarn(max time.Duration, f string, arg ...interface{}) error LimitInfo(max time.Duration, f string, arg ...interface{}) error LimitError(max time.Duration, f string, arg ...interface{}) error LimitTagWarn(max time.Duration, tag string, f string, arg ...interface{}) error LimitTagInfo(max time.Duration, tag string, f string, arg ...interface{}) error LimitTagError(max time.Duration, tag string, f string, arg ...interface{}) error }
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 (*GCloudAlerter) Error ¶
func (a *GCloudAlerter) Error(f string, arg ...interface{}) error
Errorf implementation
func (*GCloudAlerter) Info ¶
func (a *GCloudAlerter) Info(f string, arg ...interface{}) error
Info implementation
func (*GCloudAlerter) LimitError ¶
func (a *GCloudAlerter) LimitError(max time.Duration, f string, arg ...interface{}) error
LimitError implementation
func (*GCloudAlerter) LimitInfo ¶
func (a *GCloudAlerter) LimitInfo(max time.Duration, f string, arg ...interface{}) error
LimitInfo implementation
func (*GCloudAlerter) LimitTagError ¶
func (a *GCloudAlerter) LimitTagError(max time.Duration, tag, f string, arg ...interface{}) error
LimitTagError implementation
func (*GCloudAlerter) LimitTagInfo ¶
func (a *GCloudAlerter) LimitTagInfo(max time.Duration, tag, f string, arg ...interface{}) error
LimitTagInfo implementation
func (*GCloudAlerter) LimitTagWarn ¶
func (a *GCloudAlerter) LimitTagWarn(max time.Duration, tag, f string, arg ...interface{}) error
LimitTagWarn implementation
func (*GCloudAlerter) LimitWarn ¶
func (a *GCloudAlerter) LimitWarn(max time.Duration, f string, arg ...interface{}) error
LimitWarn implementation
func (*GCloudAlerter) Warn ¶
func (a *GCloudAlerter) Warn(f string, arg ...interface{}) error
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
Error implementation
func (*LogrusAlerter) Info ¶
func (a *LogrusAlerter) Info(f string, arg ...interface{}) error
Info implementation
func (*LogrusAlerter) LimitError ¶
func (a *LogrusAlerter) LimitError(max time.Duration, f string, arg ...interface{}) error
LimitError implementation
func (*LogrusAlerter) LimitInfo ¶
func (a *LogrusAlerter) LimitInfo(max time.Duration, f string, arg ...interface{}) error
LimitInfo implementation
func (*LogrusAlerter) LimitTagError ¶
func (a *LogrusAlerter) LimitTagError(max time.Duration, tag, f string, arg ...interface{}) error
LimitTagError implementation
func (*LogrusAlerter) LimitTagInfo ¶
func (a *LogrusAlerter) LimitTagInfo(max time.Duration, tag, f string, arg ...interface{}) error
LimitTagInfo implementation
func (*LogrusAlerter) LimitTagWarn ¶
func (a *LogrusAlerter) LimitTagWarn(max time.Duration, tag, f string, arg ...interface{}) error
LimitTagWarn implementation
func (*LogrusAlerter) LimitWarn ¶
func (a *LogrusAlerter) LimitWarn(max time.Duration, f string, arg ...interface{}) error
LimitWarn implementation
func (*LogrusAlerter) Warn ¶
func (a *LogrusAlerter) Warn(f string, arg ...interface{}) error
Warn implementation
type Null ¶
type Null struct { }
Null is a blackhole
func (*Null) LimitError ¶
LimitError implementation
func (*Null) LimitTagError ¶
LimitTagError implementation
func (*Null) LimitTagInfo ¶
LimitTagInfo implementation
func (*Null) LimitTagWarn ¶
LimitTagWarn implementation