Documentation ¶
Index ¶
- type FakeResourceTracker
- func (f *FakeResourceTracker[TObj]) KnownResources() ([]TObj, error)
- func (f *FakeResourceTracker[TObj]) KnownResourcesByIndex(indexName string, indexValue string) ([]TObj, error)
- func (f *FakeResourceTracker[TObj]) PublishAbnormalDeleteResource(res TObj, rawRes interface{}, resKey string)
- func (f *FakeResourceTracker[TObj]) PublishAddResource(res TObj)
- func (f *FakeResourceTracker[TObj]) PublishDeleteResource(res TObj)
- func (f *FakeResourceTracker[TObj]) PublishUpdateResource(old, new TObj)
- func (f *FakeResourceTracker[TObj]) RegisterAddedResourceChannel(client chan TObj)
- func (f *FakeResourceTracker[TObj]) RegisterDeletedResourceChannel(objs chan resourceTracker.TrackerDeleteResource[TObj])
- func (f *FakeResourceTracker[TObj]) RegisterUpdatedResourceChannel(objs chan struct{ Old, New TObj })
- func (f *FakeResourceTracker[TObj]) UnregisterAddedResourceChannel(objs chan TObj)
- func (f *FakeResourceTracker[TObj]) UnregisterDeletedResourceChannel(objs chan resourceTracker.TrackerDeleteResource[TObj])
- func (f *FakeResourceTracker[TObj]) UnregisterUpdatedResourceChannel(objs chan struct{ Old, New TObj })
- type ResourceTrackerIndexKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeResourceTracker ¶
type FakeResourceTracker[TObj kubernetes.Object] struct { sync.RWMutex Resources []TObj IndexedResources map[ResourceTrackerIndexKey][]TObj AddedResourceHandlerClients map[chan TObj]bool DeletedResourceHandlerClients map[chan resourceTracker.TrackerDeleteResource[TObj]]bool UpdatedResourceHandlerClients map[chan struct{ Old, New TObj }]bool }
func CreateFakeResourceTracker ¶
func CreateFakeResourceTracker[TObj kubernetes.Object](known []TObj, indexed map[ResourceTrackerIndexKey][]TObj) *FakeResourceTracker[TObj]
func (*FakeResourceTracker[TObj]) KnownResources ¶
func (f *FakeResourceTracker[TObj]) KnownResources() ([]TObj, error)
func (*FakeResourceTracker[TObj]) KnownResourcesByIndex ¶
func (f *FakeResourceTracker[TObj]) KnownResourcesByIndex(indexName string, indexValue string) ([]TObj, error)
func (*FakeResourceTracker[TObj]) PublishAbnormalDeleteResource ¶
func (f *FakeResourceTracker[TObj]) PublishAbnormalDeleteResource(res TObj, rawRes interface{}, resKey string)
func (*FakeResourceTracker[TObj]) PublishAddResource ¶
func (f *FakeResourceTracker[TObj]) PublishAddResource(res TObj)
func (*FakeResourceTracker[TObj]) PublishDeleteResource ¶
func (f *FakeResourceTracker[TObj]) PublishDeleteResource(res TObj)
func (*FakeResourceTracker[TObj]) PublishUpdateResource ¶
func (f *FakeResourceTracker[TObj]) PublishUpdateResource(old, new TObj)
func (*FakeResourceTracker[TObj]) RegisterAddedResourceChannel ¶ added in v2.10.0
func (f *FakeResourceTracker[TObj]) RegisterAddedResourceChannel(client chan TObj)
func (*FakeResourceTracker[TObj]) RegisterDeletedResourceChannel ¶ added in v2.10.0
func (f *FakeResourceTracker[TObj]) RegisterDeletedResourceChannel(objs chan resourceTracker.TrackerDeleteResource[TObj])
func (*FakeResourceTracker[TObj]) RegisterUpdatedResourceChannel ¶ added in v2.10.0
func (f *FakeResourceTracker[TObj]) RegisterUpdatedResourceChannel(objs chan struct{ Old, New TObj })
func (*FakeResourceTracker[TObj]) UnregisterAddedResourceChannel ¶ added in v2.10.0
func (f *FakeResourceTracker[TObj]) UnregisterAddedResourceChannel(objs chan TObj)
func (*FakeResourceTracker[TObj]) UnregisterDeletedResourceChannel ¶ added in v2.10.0
func (f *FakeResourceTracker[TObj]) UnregisterDeletedResourceChannel(objs chan resourceTracker.TrackerDeleteResource[TObj])
func (*FakeResourceTracker[TObj]) UnregisterUpdatedResourceChannel ¶ added in v2.10.0
func (f *FakeResourceTracker[TObj]) UnregisterUpdatedResourceChannel(objs chan struct{ Old, New TObj })
type ResourceTrackerIndexKey ¶
type ResourceTrackerIndexKey struct {
IndexName, IndexValue string
}
Click to show internal directories.
Click to hide internal directories.