Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeAdded = "ADDED" // resource created TypeDeleted = "DELETED" // resource deleted TypeUpdated = "UPDATED" // resource updated )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // Type is the type of the event Type Type `json:"type"` // Obj is the resource affected Obj *unstructured.Unstructured `json:"obj"` // OldObj is only set for EventTypeUpdated OldObj *unstructured.Unstructured `json:"oldObj,omitempty"` // contains filtered or unexported fields }
Event is representation of Kubernetes event
func NewDeleted ¶
func NewDeleted(obj *unstructured.Unstructured) *Event
NewDeleted creates deleted event
func NewUpdated ¶
func NewUpdated(obj, oldObj *unstructured.Unstructured) *Event
NewUpdated creates updated event
func (*Event) GroupVersionKindName ¶
GroupVersionKindName returns group, version, kind, namespace and name string for the affected resource
examples:
/v1, Kind=ConfigMap, demo/demo apps/v1, Kind=Deployment, demo/canary
func (*Event) NamespaceKey ¶
NamespaceKey returns namespaced key for the affected resource
Click to show internal directories.
Click to hide internal directories.