Documentation ¶
Index ¶
Constants ¶
View Source
const ( // log type AppAlarm LogType = "APP_ALARM" // for NDAC Applications AppFwAlarm LogType = "APPFW_ALARM" // for NDAC APPFW components // severity Minor AlarmSeverity = "MINOR" Major AlarmSeverity = "MAJOR" Critical AlarmSeverity = "CRITICAL" Warning AlarmSeverity = "WARNING" Info AlarmSeverity = "INFO" // visibility Global AlarmVisibility = "GLOBAL" // default, visible "anywhere" Operations AlarmVisibility = "OPERATIONS" // not visisble in C-UI (of NDAC) )
Variables ¶
This section is empty.
Functions ¶
func ClearAlarm ¶
func ClearAlarm(logtype LogType, alarm *AlarmDetails)
ClearAlarm produces alarm log with severity CLEARED and state 0
func InitLogger ¶
func InitLogger() error
============================== InitLogger is only for testing
func RaiseAlarm ¶
func RaiseAlarm(logtype LogType, alarm *AlarmDetails)
RaiseAlarm produces alarm log with state 1
Types ¶
type AlarmDetails ¶
type AlarmDetails struct { Name string `json:"name"` ID string `json:"id"` Severity AlarmSeverity `json:"severity"` Text string `json:"text"` State int `json:"state"` Visibility AlarmVisibility `json:"visibility,omitempty"` SubDN string `json:"subdn,omitempty"` }
func (*AlarmDetails) MarshalLogObject ¶
func (a *AlarmDetails) MarshalLogObject(enc zapcore.ObjectEncoder) error
type AlarmSeverity ¶
type AlarmSeverity string
type AlarmVisibility ¶
type AlarmVisibility string
Click to show internal directories.
Click to hide internal directories.