Documentation
¶
Index ¶
- Constants
- func BuildRegClientOptions(hosts []string, opts OCIClientOptions) []regclient.Opt
- func ExtractRegistryHosts(imagePaths []string) []string
- func GetRegClientOptions() []regclient.Opt
- func NewOCICollector(ctx context.Context, collectDataSource datasource.CollectSource, poll bool, ...) *ociCollector
- func NewOCIRegistryCollector(ctx context.Context, collectDataSource datasource.CollectSource, poll bool, ...) *ociRegistryCollector
- type OCIClientOptions
Constants ¶
const ( SpdxJson = "application/spdx+json" InTotoJson = "application/vnd.in-toto+json" )
OCI artifact types
const (
OCICollector = "OCICollector"
)
const (
OCIRegistryCollector = "OCIRegistryCollector"
)
Variables ¶
This section is empty.
Functions ¶
func BuildRegClientOptions ¶ added in v1.0.2
func BuildRegClientOptions(hosts []string, opts OCIClientOptions) []regclient.Opt
BuildRegClientOptions constructs regclient options for OCI operations. The opts parameter allows configuration of TLS settings for the specified hosts.
func ExtractRegistryHosts ¶ added in v1.0.2
ExtractRegistryHosts extracts unique registry hosts from image references. For image paths like "registry.example.com:5000/repo/image:tag", it returns "registry.example.com:5000".
func GetRegClientOptions ¶ added in v1.0.2
GetRegClientOptions returns the default regclient options with Docker credentials, certificates, and user agent configured.
func NewOCICollector ¶
func NewOCICollector(ctx context.Context, collectDataSource datasource.CollectSource, poll bool, interval time.Duration, rcOpts ...regclient.Opt) *ociCollector
NewOCICollector initializes the oci collector by passing in the repo and tag being collected. Note: OCI collector can be called upon by a upstream registry collector in the future to collect from all repos in a given registry. For further details see issue #298
Interval should be set to about 5 mins or more for production so that it doesn't clobber registries.
func NewOCIRegistryCollector ¶ added in v0.12.0
func NewOCIRegistryCollector(ctx context.Context, collectDataSource datasource.CollectSource, poll bool, interval time.Duration, rcOpts ...regclient.Opt) *ociRegistryCollector
NewOCIRegistryCollector initializes the oci registry collector that will collect from all repos in the given registry
Types ¶
type OCIClientOptions ¶ added in v1.0.2
type OCIClientOptions struct {
// InsecureSkipTLSVerify disables TLS entirely (uses HTTP)
InsecureSkipTLSVerify bool
}
OCIClientOptions contains configuration for OCI registry connections. New fields should always have sensible zero-value defaults for backward compatibility.