Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObserveResource ¶
func ObserveResource(ctx context.Context, log logr.Logger, client *dynamic.DynamicClient, gvr schema.GroupVersionResource, resourceC chan<- *ResourceObservation)
ObserveResource monitors a Kubernetes resource for changes
Types ¶
type ObservationSink ¶
type ObservationSink func(ctx context.Context, log logr.Logger, resourceC <-chan *ResourceObservation) chan struct{}
type ObservationSource ¶
type ObservationSource func(ctx context.Context, log logr.Logger, resourceC chan<- *ResourceObservation) chan struct{}
type ObservationType ¶
type ObservationType string
const ( ObservationTypeAdd ObservationType = "add" ObservationTypeUpdate ObservationType = "update" ObservationTypeDelete ObservationType = "delete" )
type ResourceObservation ¶
type ResourceObservation struct {
Group string `json:"group"`
Version string `json:"version"`
Resource string `json:"resource"`
UID types.UID `json:"uid"`
Object *unstructured.Unstructured `json:"object,omitempty"`
OldObject *unstructured.Unstructured `json:"oldObject,omitempty"`
ObservationType ObservationType `json:"observationType"`
ObservationTime time.Time `json:"observationTime"`
}
Click to show internal directories.
Click to hide internal directories.