Documentation ¶
Index ¶
- Constants
- Variables
- func AdditionalContext(format string, args ...interface{}) model.Field
- func Clear(id model.ID) error
- func ClearAll()
- func FieldBool(key string, v bool) model.Field
- func FieldFloat64(key string, v float64) model.Field
- func FieldInt(key string, v int) model.Field
- func FieldInt64(key string, v int64) model.Field
- func FieldString(key string, v string) model.Field
- func ListAll() []*model.AlarmEvent
- func Raise(id model.ID, fields ...model.Field) error
- type Service
Constants ¶
View Source
const ( Activated model.Status = "ACTIVATED" Cleared model.Status = "CLEARED" )
View Source
const ( IDBackendConnectionRefuse model.ID = "BackendConnectionRefuse" IDInternalError model.ID = "InternalError" )
View Source
const ( Subject = "__ALARM_SUBJECT__" Group = "__ALARM_GROUP__" )
View Source
const (
FieldAdditionalContext = "detail"
)
Variables ¶
View Source
var ALARM = notify.RegisterType("ALARM", 0)
Functions ¶
func AdditionalContext ¶
func ListAll ¶
func ListAll() []*model.AlarmEvent
Types ¶
type Service ¶
type Service struct { nf.Subscriber // contains filtered or unexported fields }
func NewAlarmService ¶
func NewAlarmService() *Service
func (*Service) ListAll ¶
func (ac *Service) ListAll() (ls []*model.AlarmEvent)
Click to show internal directories.
Click to hide internal directories.