Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DigestForEvent ¶
digestForEvent generates a hash digest for a given event. It uses the Murmur3 hashing algorithm to create a 64-bit hash value. The event is first cleaned and then converted to a byte slice before hashing. The resulting hash is returned as a hexadecimal string.
Parameters: - ev: The event for which the digest is to be generated.
Returns: - A hexadecimal string representing the hash digest of the event.
Types ¶
type ActionCustomResource ¶ added in v0.2.7
type ActionCustomResource string
const ( CRCreated ActionCustomResource = "Create" CRUpdated ActionCustomResource = "Update" CRDeleted ActionCustomResource = "Delete" CRObserved ActionCustomResource = "Observe" )
type ActionsEvent ¶ added in v0.2.7
type ActionsEvent map[ActionCustomResource]EventType
func NewDefaultActionsEvent ¶ added in v0.2.7
func NewDefaultActionsEvent() ActionsEvent
func (ActionsEvent) GetEventType ¶ added in v0.2.7
func (ae ActionsEvent) GetEventType(action ActionCustomResource) EventType
GetEventType returns the stored value when present, otherwise returns the package default. It never mutates the caller.
func (*ActionsEvent) MutateEvent ¶ added in v0.2.7
func (ae *ActionsEvent) MutateEvent(action ActionCustomResource, eventType EventType)
Use pointer receiver so we can allocate and modify the caller's map
type AnnotationEvent ¶ added in v0.2.2
type AnnotationEvents ¶ added in v0.2.2
type AnnotationEvents []AnnotationEvent
This is a list of annotation events. It is used to store events that are triggered by annotations in the resource. The list is used to determine which events to trigger based on the annotations present in the resource.
func NewAnnotationEvents ¶ added in v0.2.2
func NewAnnotationEvents(evts ...AnnotationEvent) AnnotationEvents
func (*AnnotationEvents) Add ¶ added in v0.2.2
func (ae *AnnotationEvents) Add(eventType EventType, annotation string, action Action, overwrite bool)
Add adds an event with optional overwrite capability
func (AnnotationEvents) HasAnnotation ¶ added in v0.2.2
func (ae AnnotationEvents) HasAnnotation(annotation string) bool
func (*AnnotationEvents) Remove ¶ added in v0.2.2
func (ae *AnnotationEvents) Remove(annotation string)
Remove removes all events with the specified annotation