communicate/events/event_collector.go
2016-11-28 16:34:24 +09:00

61 lines
1.1 KiB
Go

package events
//Collector Install Event
type CollectorInstallEvent struct {
Version string
}
func (e CollectorInstallEvent) GetUrl() string {
return COLLECTOR_INSTALL
}
func NewInstallEvent(ver string) *CollectorInstallEvent {
return &CollectorInstallEvent{
Version: ver,
}
}
//Collector Initialize Event : to do
type CollectorInitEvent struct {
OS string
Conf string
}
func (e CollectorInitEvent) GetUrl() string {
return COLLECTOR_INIT
}
func NewCollectorInitEvent(os, conf string) *CollectorInitEvent {
return &CollectorInitEvent{
OS: os,
Conf: conf,
}
}
//Collector Start Event
type CollectorStartEvent struct {
}
func (e CollectorStartEvent) GetUrl() string {
return COLLECTOR_START
}
func NewCollectorStartEvent(message string) *CollectorStartEvent {
return &CollectorStartEvent{}
}
//Collector Stop Event
type CollectorStopEvent struct {
Reason string
}
func (e CollectorStopEvent) GetUrl() string {
return COLLECTOR_STOP
}
func NewCollectorStopEvent(reason string) *CollectorStopEvent {
return &CollectorStopEvent{
Reason: reason,
}
}