Documentation ¶
Index ¶
- func CreateAppEventRecord(objectID, message, referenceID string, changeType si.EventRecord_ChangeType, ...) *si.EventRecord
- func CreateNodeEventRecord(objectID, message, referenceID string, changeType si.EventRecord_ChangeType, ...) *si.EventRecord
- func CreateQueueEventRecord(objectID, message, referenceID string, changeType si.EventRecord_ChangeType, ...) *si.EventRecord
- func CreateRequestEventRecord(objectID, referenceID, message string, resource *resources.Resource) *si.EventRecord
- func Init()
- type EventPublisher
- type EventStore
- type EventSystem
- type EventSystemImpl
- func (ec *EventSystemImpl) AddEvent(event *si.EventRecord)
- func (ec *EventSystemImpl) GetEventsFromID(id, count uint64) ([]*si.EventRecord, uint64, uint64)
- func (ec *EventSystemImpl) GetRequestCapacity() int
- func (ec *EventSystemImpl) GetRingBufferCapacity() uint64
- func (ec *EventSystemImpl) IsEventTrackingEnabled() bool
- func (ec *EventSystemImpl) Restart()
- func (ec *EventSystemImpl) StartService()
- func (ec *EventSystemImpl) StartServiceWithPublisher(withPublisher bool)
- func (ec *EventSystemImpl) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAppEventRecord ¶
func CreateAppEventRecord(objectID, message, referenceID string, changeType si.EventRecord_ChangeType, changeDetail si.EventRecord_ChangeDetail, resource *resources.Resource) *si.EventRecord
func CreateNodeEventRecord ¶
func CreateNodeEventRecord(objectID, message, referenceID string, changeType si.EventRecord_ChangeType, changeDetail si.EventRecord_ChangeDetail, resource *resources.Resource) *si.EventRecord
func CreateQueueEventRecord ¶
func CreateQueueEventRecord(objectID, message, referenceID string, changeType si.EventRecord_ChangeType, changeDetail si.EventRecord_ChangeDetail, resource *resources.Resource) *si.EventRecord
func CreateRequestEventRecord ¶
func CreateRequestEventRecord(objectID, referenceID, message string, resource *resources.Resource) *si.EventRecord
Types ¶
type EventPublisher ¶
type EventPublisher struct {
// contains filtered or unexported fields
}
func CreateShimPublisher ¶
func CreateShimPublisher(store *EventStore) *EventPublisher
func (*EventPublisher) StartService ¶
func (sp *EventPublisher) StartService()
func (*EventPublisher) Stop ¶
func (sp *EventPublisher) Stop()
type EventStore ¶
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.
func (*EventStore) CollectEvents ¶
func (es *EventStore) CollectEvents() []*si.EventRecord
func (*EventStore) CountStoredEvents ¶
func (es *EventStore) CountStoredEvents() int
func (*EventStore) Store ¶
func (es *EventStore) Store(event *si.EventRecord)
type EventSystem ¶ added in v1.4.0
type EventSystem interface { AddEvent(event *si.EventRecord) StartService() Stop() IsEventTrackingEnabled() bool GetEventsFromID(uint64, uint64) ([]*si.EventRecord, uint64, uint64) }
func GetEventSystem ¶ added in v1.4.0
func GetEventSystem() EventSystem
type EventSystemImpl ¶ added in v1.4.0
type EventSystemImpl struct { Store *EventStore // storing eventChannel sync.RWMutex // contains filtered or unexported fields }
func (*EventSystemImpl) AddEvent ¶ added in v1.4.0
func (ec *EventSystemImpl) AddEvent(event *si.EventRecord)
func (*EventSystemImpl) GetEventsFromID ¶ added in v1.4.0
func (ec *EventSystemImpl) GetEventsFromID(id, count uint64) ([]*si.EventRecord, uint64, uint64)
func (*EventSystemImpl) GetRequestCapacity ¶ added in v1.4.0
func (ec *EventSystemImpl) GetRequestCapacity() int
func (*EventSystemImpl) GetRingBufferCapacity ¶ added in v1.4.0
func (ec *EventSystemImpl) GetRingBufferCapacity() uint64
func (*EventSystemImpl) IsEventTrackingEnabled ¶ added in v1.4.0
func (ec *EventSystemImpl) IsEventTrackingEnabled() bool
func (*EventSystemImpl) Restart ¶ added in v1.4.0
func (ec *EventSystemImpl) Restart()
func (*EventSystemImpl) StartService ¶ added in v1.4.0
func (ec *EventSystemImpl) StartService()
func (*EventSystemImpl) StartServiceWithPublisher ¶ added in v1.4.0
func (ec *EventSystemImpl) StartServiceWithPublisher(withPublisher bool)
func (*EventSystemImpl) Stop ¶ added in v1.4.0
func (ec *EventSystemImpl) Stop()
Click to show internal directories.
Click to hide internal directories.