Documentation
¶
Index ¶
- Variables
- func ConvertUnstructuredToOperatorCommand(un *unstructured.Unstructured) (*v1alpha1.OperatorCommand, error)
- type CommandWatchHandler
- type CooldownQueue
- type RegistryCommandsHandler
- type WatchHandler
- func (wh *WatchHandler) HandleSBOMFilteredEvents(sfEvents <-chan watch.Event, producedCommands chan<- *apis.Command, ...)
- func (wh *WatchHandler) PodWatch(ctx context.Context, workerPool *ants.PoolWithFunc) error
- func (wh *WatchHandler) SBOMFilteredWatch(ctx context.Context, workerPool *ants.PoolWithFunc)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingWLID = fmt.Errorf("missing WLID") ErrMissingSlug = fmt.Errorf("missing slug") ErrMissingImageTag = fmt.Errorf("missing image ID") ErrMissingImageID = fmt.Errorf("missing image tag") ErrMissingContainerName = fmt.Errorf("missing container name") )
View Source
var ( ErrUnsupportedObject = errors.New("unsupported object type") ErrUnknownImageHash = errors.New("unknown image hash") )
Functions ¶
func ConvertUnstructuredToOperatorCommand ¶ added in v0.2.40
func ConvertUnstructuredToOperatorCommand(un *unstructured.Unstructured) (*v1alpha1.OperatorCommand, error)
Types ¶
type CommandWatchHandler ¶ added in v0.2.40
type CommandWatchHandler struct {
// contains filtered or unexported fields
}
func NewCommandWatchHandler ¶ added in v0.2.40
func NewCommandWatchHandler(k8sAPI *k8sinterface.KubernetesApi, config config.IConfig) *CommandWatchHandler
func (*CommandWatchHandler) AddHandler ¶ added in v0.2.40
func (cwh *CommandWatchHandler) AddHandler(obj runtime.Object)
func (*CommandWatchHandler) CommandWatch ¶ added in v0.2.40
func (cwh *CommandWatchHandler) CommandWatch(ctx context.Context)
func (*CommandWatchHandler) RegisterForCommands ¶ added in v0.2.40
func (cwh *CommandWatchHandler) RegisterForCommands(receiver chan v1alpha1.OperatorCommand)
type CooldownQueue ¶ added in v0.2.4
type CooldownQueue struct {
ResultChan <-chan watch.Event
// contains filtered or unexported fields
}
CooldownQueue is a queue that lets clients put events into it with a cooldown
When a client puts an event into a queue, it waits for a cooldown period before the event is forwarded to the consumer. If an event for the same key is put into the queue again before the cooldown period is over, the event is overridden and the cooldown period is reset.
func NewCooldownQueue ¶ added in v0.2.4
func NewCooldownQueue() *CooldownQueue
NewCooldownQueue returns a new Cooldown Queue
func (*CooldownQueue) Closed ¶ added in v0.2.4
func (q *CooldownQueue) Closed() bool
func (*CooldownQueue) Enqueue ¶ added in v0.2.4
func (q *CooldownQueue) Enqueue(e watch.Event)
Enqueue enqueues an event in the Cooldown Queue
func (*CooldownQueue) Stop ¶ added in v0.2.4
func (q *CooldownQueue) Stop()
type RegistryCommandsHandler ¶ added in v0.2.40
type RegistryCommandsHandler struct {
// contains filtered or unexported fields
}
func NewRegistryCommandsHandler ¶ added in v0.2.40
func NewRegistryCommandsHandler(ctx context.Context, k8sAPI *k8sinterface.KubernetesApi, commandsWatcher *CommandWatchHandler, config config.IConfig) *RegistryCommandsHandler
func (*RegistryCommandsHandler) Start ¶ added in v0.2.40
func (ch *RegistryCommandsHandler) Start()
type WatchHandler ¶
type WatchHandler struct {
SlugToImageID maps.SafeMap[string, string] // map of <Slug> : string <image ID>
WlidAndImageID mapset.Set[string] // set of <wlid+imageID>
// contains filtered or unexported fields
}
func NewWatchHandler ¶
func NewWatchHandler(ctx context.Context, cfg config.IConfig, k8sAPI *k8sinterface.KubernetesApi, storageClient kssc.Interface, eventQueue *CooldownQueue) *WatchHandler
NewWatchHandler creates a new WatchHandler, initializes the maps and returns it
func (*WatchHandler) HandleSBOMFilteredEvents ¶
func (*WatchHandler) PodWatch ¶
func (wh *WatchHandler) PodWatch(ctx context.Context, workerPool *ants.PoolWithFunc) error
func (*WatchHandler) SBOMFilteredWatch ¶
func (wh *WatchHandler) SBOMFilteredWatch(ctx context.Context, workerPool *ants.PoolWithFunc)
SBOMFilteredWatch watches and processes changes on Filtered SBOMs
Click to show internal directories.
Click to hide internal directories.