Documentation ¶
Index ¶
- Constants
- func CastNotificationReasonToString(typ int) string
- func CastNotificationTypeToString(typ int) string
- func GetVaultMacroName(data unsafe.Pointer) string
- func SetVaultMacroValue(data unsafe.Pointer, value string)
- type ContactNotificationCheck
- type Host
- type HostCheck
- type HostList
- type HostStatus
- type MetaHostAndService
- type MetaHostAndServiceList
- type MetaType
- type NotificationCheck
- type Process
- type Service
- type ServiceCheck
- type ServiceList
- type Timeval
Constants ¶
const ( // NotificationNormal notification reason NotificationNormal = C.NOTIFICATION_NORMAL // NotificationAcknowledgement notification reason NotificationAcknowledgement = C.NOTIFICATION_ACKNOWLEDGEMENT // NotificationFlappingstart notification reason NotificationFlappingstart = C.NOTIFICATION_FLAPPINGSTART // NotificationFlappingstop notification reason NotificationFlappingstop = C.NOTIFICATION_FLAPPINGSTOP // NotificationFlappingdisabled notification reason NotificationFlappingdisabled = C.NOTIFICATION_FLAPPINGDISABLED // NotificationDowntimestart notification reason NotificationDowntimestart = C.NOTIFICATION_DOWNTIMESTART // NotificationDowntimeend notification reason NotificationDowntimeend = C.NOTIFICATION_DOWNTIMEEND // NotificationDowntimecancelled notification reason NotificationDowntimecancelled = C.NOTIFICATION_DOWNTIMECANCELLED // NotificationCustom notification reason NotificationCustom = C.NOTIFICATION_CUSTOM // HostNotification notification type HostNotification = C.HOST_NOTIFICATION // ServiceNotification notification type ServiceNotification = C.SERVICE_NOTIFICATION )
Variables ¶
This section is empty.
Functions ¶
func GetVaultMacroName ¶
GetVaultMacroName returns macro name from pointer
func SetVaultMacroValue ¶
SetVaultMacroValue sets vault macro value
Types ¶
type ContactNotificationCheck ¶
type ContactNotificationCheck struct { Process NotificationType int StartTime Timeval EndTime Timeval HostName string ServiceDescription string ReasonType int State int Output string AckAuthor string AckData string Escalated int ObjectPtr unsafe.Pointer ContactName string }
ContactNotificationCheck notification check structure
func CastContactNotificationCheck ¶
func CastContactNotificationCheck(data unsafe.Pointer) ContactNotificationCheck
CastContactNotificationCheck tries to cast the pointer to an go struct
type Host ¶
type Host struct { MetaHostAndService Name string Alias string // CheckCommand contains args CheckCommand string // Command is the pure pluginname Command string }
Host represents a naemon host
type HostCheck ¶
type HostCheck struct { Process HostName string CheckType int CurrentAttempt int MaxAttempts int StateType int State int Timeout int CommandName string CommandArgs string CommandLine string StartTime Timeval EndTime Timeval EarlyTimeout int ExecutionTime float64 Latency float64 ReturnCode int Output string LongOutput string PerfData string ObjectPtr unsafe.Pointer }
HostCheck host check structure
func CastHostCheck ¶
CastHostCheck tries to cast the pointer to an go struct
type HostList ¶
type HostList []Host
HostList is a list of hosts
func (HostList) GenMetaHostAndServiceList ¶
func (host HostList) GenMetaHostAndServiceList() MetaHostAndServiceList
GenMetaHostAndServiceList will create a MetaHostAndServiceList
type HostStatus ¶
func CastHostStatus ¶
func CastHostStatus(data unsafe.Pointer) HostStatus
CastHostStatus tries to cast the pointer to an go struct
type MetaHostAndService ¶
type MetaHostAndService struct { DisplayName string ChecksEnabled int CheckType int IsFlapping int CurrentState int // 0: up, 1: down, 2: unreachable. See stateTypes ScheduledDowntimeDepth int PendingFlexDowntimeDepth int }
MetaHostAndService contains data for host and service
func CastMetaHostAndService ¶
func CastMetaHostAndService(data unsafe.Pointer, typ MetaType) MetaHostAndService
CastMetaHostAndService tries to cast the pointer to an go struct
type MetaHostAndServiceList ¶
type MetaHostAndServiceList []MetaHostAndService
MetaHostAndServiceList is a list of MetaHostAndService
type MetaType ¶
type MetaType int
MetaType is needed to differentiate the void pointer in the constructor
type NotificationCheck ¶
type NotificationCheck struct { Process NotificationType int StartTime Timeval EndTime Timeval HostName string ServiceDescription string ReasonType int State int Output string AckAuthor string AckData string Escalated int ContactsNotified int ObjectPtr unsafe.Pointer }
NotificationCheck notification check structure
func CastNotificationCheck ¶
func CastNotificationCheck(data unsafe.Pointer) NotificationCheck
CastNotificationCheck tries to cast the pointer to an go struct
type Process ¶
Process will be returned by process data
func CastProcess ¶
CastProcess tries to cast the pointer to an go struct
type Service ¶
type Service struct { MetaHostAndService HostName string Description string // CheckCommand contains args CheckCommand string // Command is the pure pluginname Command string }
Service represents a naemon service
func CastService ¶
CastService tries to cast the pointer to an go struct
type ServiceCheck ¶
type ServiceCheck struct { Process Service CheckType int CurrentAttempt int MaxAttempts int StateType int State int Timeout int StartTime Timeval EndTime Timeval EarlyTimeout int ExecutionTime float64 Latency float64 ReturnCode int Output string LongOutput string PerfData string ObjectPtr unsafe.Pointer }
ServiceCheck service check structure
func CastServiceCheck ¶
func CastServiceCheck(data unsafe.Pointer) ServiceCheck
CastServiceCheck tries to cast the pointer to an go struct
type ServiceList ¶
type ServiceList []Service
ServiceList is a list of services
func (ServiceList) GenMetaHostAndServiceList ¶
func (service ServiceList) GenMetaHostAndServiceList() MetaHostAndServiceList
GenMetaHostAndServiceList will create a MetaHostAndServiceList
type Timeval ¶
Timeval represents the c struct
func CastTimeval ¶
CastTimeval tries to cast the pointer to an go struct
func CastTimevalStruct ¶
func CastTimevalStruct(data C.struct_timeval) Timeval
CastTimevalStruct cast the C struct to an go struct