Documentation
¶
Index ¶
- type Client
- type ClientOpts
- func WithDisableManifestMaxExtractedSize(disableManifestMaxExtractedSize bool) ClientOpts
- func WithEventHandlers(handlers EventHandlers) ClientOpts
- func WithImagePaths(repoCachePaths utilio.TempPaths) ClientOpts
- func WithIndexCache(indexCache tagsCache) ClientOpts
- func WithManifestMaxExtractedSize(manifestMaxExtractedSize int64) ClientOpts
- type Creds
- type EventHandlers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// ResolveRevision resolves a tag, digest, or semantic version constraint to a concrete digest.
// If noCache is true, the resolution bypasses the local tags cache and queries the remote registry.
// If the revision is already a digest, it is returned as-is.
ResolveRevision(ctx context.Context, revision string, noCache bool) (string, error)
// DigestMetadata retrieves an OCI manifest for a given digest.
DigestMetadata(ctx context.Context, digest string) (*imagev1.Manifest, error)
// CleanCache is invoked on a hard-refresh or when the manifest cache has expired. This removes the OCI image from
// the cached path, which is looked up by the specified revision.
CleanCache(revision string) error
// Extract retrieves and unpacks the contents of an OCI image identified by the specified revision.
// If successful, the extracted contents are extracted to a randomized tempdir.
Extract(ctx context.Context, revision string) (string, utilio.Closer, error)
// TestRepo verifies the connectivity and accessibility of the repository.
TestRepo(ctx context.Context) (bool, error)
// GetTags retrieves the list of tags for the repository.
GetTags(ctx context.Context, noCache bool) ([]string, error)
}
Client is a generic OCI client interface that provides methods for interacting with an OCI (Open Container Initiative) registry.
type ClientOpts ¶
type ClientOpts func(c *nativeOCIClient)
func WithDisableManifestMaxExtractedSize ¶
func WithDisableManifestMaxExtractedSize(disableManifestMaxExtractedSize bool) ClientOpts
func WithEventHandlers ¶ added in v3.3.0
func WithEventHandlers(handlers EventHandlers) ClientOpts
WithEventHandlers sets the git client event handlers
func WithImagePaths ¶
func WithImagePaths(repoCachePaths utilio.TempPaths) ClientOpts
func WithIndexCache ¶
func WithIndexCache(indexCache tagsCache) ClientOpts
func WithManifestMaxExtractedSize ¶
func WithManifestMaxExtractedSize(manifestMaxExtractedSize int64) ClientOpts
type EventHandlers ¶ added in v3.3.0
type EventHandlers struct {
OnExtract func(repo string) func()
OnResolveRevision func(repo string) func()
OnDigestMetadata func(repo string) func()
OnTestRepo func(repo string) func()
OnGetTags func(repo string) func()
OnExtractFail func(repo string) func(revision string)
OnResolveRevisionFail func(repo string) func(revision string)
OnDigestMetadataFail func(repo string) func(revision string)
OnTestRepoFail func(repo string) func()
OnGetTagsFail func(repo string) func()
}
Click to show internal directories.
Click to hide internal directories.