controllers

package
v0.0.0-...-dd22938 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageScan

type ImageScan struct {
	// contains filtered or unexported fields
}

ImageScan controller handles events related to ImageScans. It starts and receives events from the informer, calling appropriate functions on our concrete services layer implementation.

func NewImageScan

func NewImageScan(scansvc ImageScanSyncer) *ImageScan

NewImageScan returns a new controller for ImageScans.

func (*ImageScan) Name

func (i *ImageScan) Name() string

Name returns a name identifier for this controller.

func (*ImageScan) RequiresLeaderElection

func (i *ImageScan) RequiresLeaderElection() bool

RequiresLeaderElection returns if this controller requires or not a leader lease to run.

func (*ImageScan) Start

func (i *ImageScan) Start(ctx context.Context) error

Start starts the controller's event loop.

type ImageScanSyncer

type ImageScanSyncer interface {
	Sync(context.Context, *v1b1scans.ImageScan) error
	Get(context.Context, string) (*v1b1scans.ImageScan, error)
	AddEventHandler(cache.ResourceEventHandler)
}

ImageScanSyncer abstraction exists to make testing easier. You most likely wanna see ImageScan struct under services/imagescan.go for a concrete implementation of this.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL