Documentation
¶
Index ¶
- func CreateAndSetEventCache()
- func CreateAppEventRecord(objectID, reason, message string) (*si.EventRecord, error)
- func CreateNodeEventRecord(objectID, reason, message string) (*si.EventRecord, error)
- func CreateQueueEventRecord(objectID, groupID, reason, message string) (*si.EventRecord, error)
- func CreateRequestEventRecord(objectID, groupID, reason, message string) (*si.EventRecord, error)
- type EventCache
- type EventPublisher
- type EventStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndSetEventCache ¶
func CreateAndSetEventCache()
func CreateAppEventRecord ¶
func CreateAppEventRecord(objectID, reason, message string) (*si.EventRecord, error)
func CreateNodeEventRecord ¶
func CreateNodeEventRecord(objectID, reason, message string) (*si.EventRecord, error)
func CreateQueueEventRecord ¶
func CreateQueueEventRecord(objectID, groupID, reason, message string) (*si.EventRecord, error)
func CreateRequestEventRecord ¶
func CreateRequestEventRecord(objectID, groupID, reason, message string) (*si.EventRecord, error)
Types ¶
type EventCache ¶
type EventCache struct {
Store EventStore // storing eventChannel
sync.Mutex
// contains filtered or unexported fields
}
func GetEventCache ¶
func GetEventCache() *EventCache
func (*EventCache) AddEvent ¶
func (ec *EventCache) AddEvent(event *si.EventRecord)
func (*EventCache) StartService ¶
func (ec *EventCache) StartService()
func (*EventCache) Stop ¶
func (ec *EventCache) Stop()
type EventPublisher ¶
type EventPublisher interface {
StartService()
Stop()
}
func CreateShimPublisher ¶
func CreateShimPublisher(store EventStore) EventPublisher
type EventStore ¶
type EventStore interface {
Store(event *si.EventRecord)
CollectEvents() []*si.EventRecord
CountStoredEvents() int
}
The EventStore operates under the following assumptions:
- there is a cap for the number of events stored
- the CollectEvents() function clears the currently stored events in the EventStore
Assuming the rate of events generated by the scheduler component in a given time period is high, calling CollectEvents() periodically should be fine.
Click to show internal directories.
Click to hide internal directories.