Documentation
¶
Index ¶
- Constants
- func NewUsageCache(manager manager.Manager, trigger Trigger) *usageCache
- type Extractor
- type ExtractorFunc
- type ObjectUsageInfo
- func (i ObjectUsageInfo) Add(relation string, ids utils.ObjectIds)
- func (i ObjectUsageInfo) Equal(other ObjectUsageInfo) bool
- func (i ObjectUsageInfo) GetObjectIds() utils.ObjectIds
- func (i ObjectUsageInfo) GetObjectIdsForGK(gk schema.GroupKind) utils.ObjectIds
- func (i ObjectUsageInfo) GetObjectIdsForRelation(relation string) utils.ObjectIds
- func (i ObjectUsageInfo) GetObjectIdsForRelationToGK(relation string, gk schema.GroupKind) utils.ObjectIds
- type Trigger
- type UsageCache
Constants ¶
View Source
const (
RelationUses = "uses"
)
Variables ¶
This section is empty.
Functions ¶
func NewUsageCache ¶
Types ¶
type ExtractorFunc ¶
func (ExtractorFunc) ExtractUsage ¶
func (e ExtractorFunc) ExtractUsage(object client.Object) utils.ObjectIds
type ObjectUsageInfo ¶
func NewObjectUsageInfo ¶
func NewObjectUsageInfo(config ...interface{}) ObjectUsageInfo
func (ObjectUsageInfo) Equal ¶
func (i ObjectUsageInfo) Equal(other ObjectUsageInfo) bool
func (ObjectUsageInfo) GetObjectIds ¶
func (i ObjectUsageInfo) GetObjectIds() utils.ObjectIds
func (ObjectUsageInfo) GetObjectIdsForGK ¶
func (i ObjectUsageInfo) GetObjectIdsForGK(gk schema.GroupKind) utils.ObjectIds
func (ObjectUsageInfo) GetObjectIdsForRelation ¶
func (i ObjectUsageInfo) GetObjectIdsForRelation(relation string) utils.ObjectIds
func (ObjectUsageInfo) GetObjectIdsForRelationToGK ¶
type UsageCache ¶
type UsageCache interface {
Wait()
RegisterExtractor(ctx context.Context, source schema.GroupKind, relation string, target schema.GroupKind, extractor Extractor) error
ReplaceObject(object client.Object) (utils.ObjectId, utils.ObjectIds)
ReplaceObjectUsageInfo(id utils.ObjectId, usages ObjectUsageInfo) utils.ObjectIds
DeleteObject(id utils.ObjectId) utils.ObjectIds
GetUsersFor(id utils.ObjectId) utils.ObjectIds
GetUsersForGK(id utils.ObjectId, gk schema.GroupKind) utils.ObjectIds
GetUsersForRelationToGK(id utils.ObjectId, relation string, gk schema.GroupKind) utils.ObjectIds
GetUsersForRelation(id utils.ObjectId, relation string) utils.ObjectIds
GetUsedObjectsFor(id utils.ObjectId) utils.ObjectIds
GetUsedObjectsForGK(id utils.ObjectId, gk schema.GroupKind) utils.ObjectIds
GetUsedObjectsForRelationToGK(id utils.ObjectId, relation string, gk schema.GroupKind) utils.ObjectIds
GetUsedObjectsForRelation(id utils.ObjectId, relation string) utils.ObjectIds
}
Click to show internal directories.
Click to hide internal directories.