Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// EnableDeviceTaints controls whether DeviceTaintRules
// will be reflected in ResourceSlices reported by the tracker.
//
// If false, then TaintInformer and ClassInformer
// are not needed. The tracker turns into
// a thin wrapper around the underlying
// SliceInformer, with no processing of its own.
EnableDeviceTaints bool
SliceInformer resourceinformers.ResourceSliceInformer
TaintInformer resourcealphainformers.DeviceTaintRuleInformer
ClassInformer resourceinformers.DeviceClassInformer
// KubeClient is used to generate Events when CEL expressions
// encounter runtime errors.
KubeClient kubernetes.Interface
}
Options configure a Tracker.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker maintains a view of ResourceSlice objects with matching DeviceTaintRules applied. It is backed by informers to process potential changes to resolved ResourceSlices asynchronously.
func StartTracker ¶
StartTracker creates and initializes informers for a new Tracker.
func (*Tracker) AddEventHandler ¶
func (t *Tracker) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error)
AddEventHandler adds an event handler to the tracker. Events to a single handler are delivered sequentially, but there is no coordination between different handlers. A handler may use the tracker.
The return value can be used to wait for cache synchronization. All currently know ResourceSlices get delivered via Add events before this method returns.
func (*Tracker) HasSynced ¶
HasSynced returns true if the tracker is done with processing all currently existing input objects. Adding a new event handler at that point is possible and will emit events with up-to-date ResourceSlice objects.
func (*Tracker) ListPatchedResourceSlices ¶
func (t *Tracker) ListPatchedResourceSlices() ([]*resourceapi.ResourceSlice, error)
ListPatchedResourceSlices returns all ResourceSlices in the cluster with modifications from DeviceTaints applied.