Documentation
¶
Index ¶
- Variables
- func NewImageHashWLIDsMap() *imageHashWLIDMap
- func NewImageHashWLIDsMapFrom(startingValues map[string][]string) *imageHashWLIDMap
- func NewWLIDSet(values ...string) wlidSet
- type WatchHandler
- func (wh *WatchHandler) GetContainerToImageIDForWlid(wlid string) map[string]string
- func (wh *WatchHandler) GetWlidsForImageHash(imageHash string) []string
- func (wh *WatchHandler) GetWlidsToContainerToImageIDMap() WlidsToContainerToImageIDMap
- func (wh *WatchHandler) HandleSBOMEvents(sbomEvents <-chan watch.Event, errorCh chan<- error)
- func (wh *WatchHandler) HandleSBOMFilteredEvents(sfEvents <-chan watch.Event, producedCommands chan<- *apis.Command, ...)
- func (wh *WatchHandler) HandleVulnerabilityManifestEvents(vmEvents <-chan watch.Event, errorCh chan<- error)
- func (wh *WatchHandler) PodWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
- func (wh *WatchHandler) SBOMFilteredWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
- func (wh *WatchHandler) SBOMWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
- func (wh *WatchHandler) VulnerabilityManifestWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
- type WlidsToContainerToImageIDMap
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingInstanceIDAnnotation = errors.New("object is missing Instance ID annotation") ErrMissingWLIDAnnotation = errors.New("object is missing the WLID annotation") )
var ( ErrUnsupportedObject = errors.New("unsupported object type") ErrUnknownImageHash = errors.New("unknown image hash") )
Functions ¶
func NewImageHashWLIDsMap ¶
func NewImageHashWLIDsMap() *imageHashWLIDMap
NewImageHashWLIDsMap returns a new Image Hash to WLID map
func NewImageHashWLIDsMapFrom ¶
NewImageHashWLIDsMapFrom returns a new Image Hash to WLID map populated from a map of starting values
func NewWLIDSet ¶
func NewWLIDSet(values ...string) wlidSet
NewWLIDSet returns a new empty set of WLIDs
Types ¶
type WatchHandler ¶
type WatchHandler struct {
// contains filtered or unexported fields
}
func NewWatchHandler ¶
func NewWatchHandler(ctx context.Context, k8sAPI *k8sinterface.KubernetesApi, storageClient kssc.Interface, imageIDsToWLIDsMap map[string][]string, instanceIDs []string) (*WatchHandler, error)
NewWatchHandler creates a new WatchHandler, initializes the maps and returns it
func (*WatchHandler) GetContainerToImageIDForWlid ¶
func (wh *WatchHandler) GetContainerToImageIDForWlid(wlid string) map[string]string
func (*WatchHandler) GetWlidsForImageHash ¶
func (wh *WatchHandler) GetWlidsForImageHash(imageHash string) []string
func (*WatchHandler) GetWlidsToContainerToImageIDMap ¶
func (wh *WatchHandler) GetWlidsToContainerToImageIDMap() WlidsToContainerToImageIDMap
returns wlids map
func (*WatchHandler) HandleSBOMEvents ¶
func (wh *WatchHandler) HandleSBOMEvents(sbomEvents <-chan watch.Event, errorCh chan<- error)
HandleSBOMEvents handles SBOM-related events
Handling events is defined as deleting SBOMs that are not known to the Operator
func (*WatchHandler) HandleSBOMFilteredEvents ¶
func (*WatchHandler) HandleVulnerabilityManifestEvents ¶
func (wh *WatchHandler) HandleVulnerabilityManifestEvents(vmEvents <-chan watch.Event, errorCh chan<- error)
func (*WatchHandler) PodWatch ¶
func (wh *WatchHandler) PodWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
watch for pods changes, and trigger scans accordingly
func (*WatchHandler) SBOMFilteredWatch ¶
func (wh *WatchHandler) SBOMFilteredWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
SBOMFilteredWatch watches and processes changes on Filtered SBOMs
func (*WatchHandler) SBOMWatch ¶
func (wh *WatchHandler) SBOMWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
watch for sbom changes, and trigger scans accordingly
func (*WatchHandler) VulnerabilityManifestWatch ¶
func (wh *WatchHandler) VulnerabilityManifestWatch(ctx context.Context, sessionObjChan *chan utils.SessionObj)
VulnerabilityManifestWatch watches for Vulnerability Manifests and handles them accordingly