Documentation ¶
Index ¶
- func AddScanner(id string)
- func GetAwsEcrAuthToken(awsKey *share.CLUSAWSAccountKey, proxy string) (*awsEcrAuth, error)
- func GetProxy(registry string) string
- func GetRegistryCount() int
- func GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, ...) []*nvsysadmission.ScannedImageSummary
- func LeadChangeNotify(isLeader bool)
- func RegistryConfigHandler(nType cluster.ClusterNotifyType, key string, value []byte)
- func RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, vpf common.VPFInterface) (utils.Set, []string, []string)
- func RegistryScanCacheRefresh(ctx context.Context, vpf common.VPFInterface)
- func RegistryStateUpdate(name string, state *share.CLUSRegistryState)
- func RemoveScanner(id string)
- func ScannerChangeNotify(isScanner bool)
- func ScannerDBChange(db *share.CLUSScannerDB)
- func UpdateProxy(httpProxy, httpsProxy *share.CLUSProxy)
- type Context
- type Registry
- type ScanInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddScanner ¶
func AddScanner(id string)
func GetAwsEcrAuthToken ¶
func GetAwsEcrAuthToken(awsKey *share.CLUSAWSAccountKey, proxy string) (*awsEcrAuth, error)
func GetScannedImageSummary ¶
func GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, vpf common.VPFInterface) []*nvsysadmission.ScannedImageSummary
func LeadChangeNotify ¶
func LeadChangeNotify(isLeader bool)
func RegistryConfigHandler ¶
func RegistryConfigHandler(nType cluster.ClusterNotifyType, key string, value []byte)
func RegistryImageStateUpdate ¶
func RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, vpf common.VPFInterface) (utils.Set, []string, []string)
func RegistryScanCacheRefresh ¶
func RegistryScanCacheRefresh(ctx context.Context, vpf common.VPFInterface)
func RegistryStateUpdate ¶
func RegistryStateUpdate(name string, state *share.CLUSRegistryState)
Allow manual start/stop scan even if auto-scan is enabled, scan can be restarted manually or when new images added
func RemoveScanner ¶
func RemoveScanner(id string)
func ScannerChangeNotify ¶
func ScannerChangeNotify(isScanner bool)
func ScannerDBChange ¶
func ScannerDBChange(db *share.CLUSScannerDB)
func UpdateProxy ¶
Types ¶
type Context ¶
type Context struct { AuditQueue cluster.ObjectQueueInterface ScanChan chan *resource.Event TimerWheel *utils.TimerWheel ScanLog *log.Logger MutexLog *log.Logger }
type ScanInterface ¶
type ScanInterface interface { // registry GetRegistry(name string, acc *access.AccessControl) (*api.RESTRegistry, error) GetRegistryState(name string, acc *access.AccessControl) (*share.CLUSRegistryState, error) GetRegistrySummary(name string, acc *access.AccessControl) (*api.RESTRegistrySummary, error) GetAllRegistrySummary(acc *access.AccessControl) []*api.RESTRegistrySummary GetRegistryImageSummary(name string, vpf common.VPFInterface, acc *access.AccessControl) []*api.RESTRegistryImageSummary GetRegistryVulnerabilities(name string, vpf common.VPFInterface, showTag string, acc *access.AccessControl) (map[string][]*api.RESTVulnerability, map[string][]api.RESTIDName, error) GetRegistryImageReport(name, id string, vpf common.VPFInterface, showTag string, acc *access.AccessControl) (*api.RESTScanReport, error) GetRegistryLayersReport(name, id string, vpf common.VPFInterface, showTag string, acc *access.AccessControl) (*api.RESTScanLayersReport, error) GetRegistryDebugImages(source string) []*api.RESTRegistryDebugImage StartRegistry(name string) error StopRegistry(name string) error // GetScannedImageSummary(reqImgRegistry utils.Set, reqImgRepo, reqImgTag string, vpf common.VPFInterface) []*nvsysadmission.ScannedImageSummary // RegistryImageStateUpdate(name, id string, sum *share.CLUSRegistryImageSummary, vpf common.VPFInterface) (utils.Set, []string, []string) StoreRepoScanResult(result *share.ScanResult) error TestRegistry(ctx context.Context, config *share.CLUSRegistryConfig, tracer httptrace.HTTPTrace) error }
func Init ¶
func Init(ctx *Context, leader bool) ScanInterface
Click to show internal directories.
Click to hide internal directories.