Documentation ¶
Overview ¶
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurator ¶
type Configurator interface { // ApplyConfig applies configurations to data source. ApplyConfig(ctx context.Context, ds v1alpha1.DataSource) error }
Configurator is the interface for configuring data source.
type HealthChecker ¶
type HealthChecker interface { // Ping checks service whether ready. Ping(ctx context.Context) error }
HealthChecker is the interface for health check.
type ReadOption ¶
type ReadOption func(opts *ReadOptions)
ReadOption is a read option template func.
func WithMetadata ¶
func WithMetadata(meta core.Metadata) ReadOption
WithMetadata defines read option for which metadata required.
type ReadOptions ¶
ReadOptions contains options for client reading.
type Reader ¶
type Reader interface { // Read data for the specified artifact. // If there are multiple data kinds supported by the upstream provider, then return them at the same time. // Any error occurred, non-nil error should be returned. Read(ctx context.Context, id core.ArtifactID, options ...ReadOption) ([]types.Store, error) }
Reader for reading or requesting security data from the upstream data provider.
type Register ¶
type Register interface { // RegisterKnownRegistries registers known registries to data source. RegisterKnownRegistries(ctx context.Context, registries []v1alpha1.KnownRegistry) error }
Register is the interface for registering known registry to data source.
type Requester ¶
type Requester interface { // Request the upstream data provider to create missing data for the specified artifact. // Request just asks for missing data and does not track the data creation process. If the data is ready, // it can be Read() next time. // As the data creation may need some time and can not be ready soon, this method may be called multiple times. // To avoid creating duplicated data creation processes, this method must be idempotent. Request(ctx context.Context, id core.ArtifactID) error }
Requester is designed to issue request to the upstream provider for filling in the missing data.
Click to show internal directories.
Click to hide internal directories.