Documentation
¶
Overview ¶
Package events define a generic type of event for implementing of an event distribution mechanism.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigEvent ¶
type ConfigEvent EventHappend
ConfigEvent a configuration event
func (*ConfigEvent) GetClient ¶
func (ce *ConfigEvent) GetClient() interface{}
GetClient returns the stream client corresponding to the given ConfigEvent
func (*ConfigEvent) GetSubject ¶
func (ce *ConfigEvent) GetSubject() string
GetSubject returns the subject of the event
func (*ConfigEvent) GetTime ¶
func (ce *ConfigEvent) GetTime() time.Time
GetTime returns the time when the event occurs
func (*ConfigEvent) GetType ¶
func (ce *ConfigEvent) GetType() EventType
GetType returns type of an Event
func (*ConfigEvent) GetValues ¶
func (ce *ConfigEvent) GetValues() interface{}
GetValues returns the values of the event
type Event ¶
type Event interface {
GetType() EventType
GetTime() time.Time
GetValues() interface{}
GetSubject() string
Clone() Event
}
Event an interface which defines the Event methods
type EventHappend ¶
type EventHappend struct {
Subject string
Time time.Time
Etype EventType
Values interface{}
Client interface{}
}
EventHappend is a general purpose base type of event
func (*EventHappend) GetSubject ¶
func (eh *EventHappend) GetSubject() string
GetSubject returns the subject of the event
func (*EventHappend) GetTime ¶
func (eh *EventHappend) GetTime() time.Time
GetTime returns the time when the event occurs
func (*EventHappend) GetType ¶
func (eh *EventHappend) GetType() EventType
GetType returns type of an Event
func (*EventHappend) GetValues ¶
func (eh *EventHappend) GetValues() interface{}
GetValues returns the values of the event
type EventType ¶
type EventType uint16
EventType is an enumeration of the kind of events that can occur.
Values of the EventType enumeration
type RandomEvent ¶
type RandomEvent EventHappend
RandomEvent a random event
func (*RandomEvent) GetSubject ¶
func (ce *RandomEvent) GetSubject() string
GetSubject returns the subject of the event
func (*RandomEvent) GetTime ¶
func (ce *RandomEvent) GetTime() time.Time
GetTime returns the time when the event occurs
func (*RandomEvent) GetType ¶
func (ce *RandomEvent) GetType() EventType
GetType returns type of an Event
func (*RandomEvent) GetValues ¶
func (ce *RandomEvent) GetValues() interface{}
GetValues returns the values of the event