Documentation
¶
Overview ¶
Package cache implements tools for OCI registry caching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
RemoteRegistry *remote.Registry
ReferrersType string
RewritePull map[string]string
// contains filtered or unexported fields
}
Registry represents the cached registry, HTTP client and repository-specific settings defined in the configuration.
func GetRegistryFromCache ¶
func GetRegistryFromCache(partialName string, cache *RegistryCache) Registry
GetRegistryFromCache loads a registry from a RegistryCache based on a regex match with partial name, or an empty one if no match is found.
func (*Registry) IsValid ¶
IsValid returns true if the registry object exists (e.g. if remoteRegistry is not nil).
func (*Registry) SetSigningKeyPath ¶
SetSigningKeyPath sets the signing key path for a registry.
func (*Registry) SignCertPath ¶
SignCertPath returns the signing certificate private key path for the associated registry.
type RegistryCache ¶
type RegistryCache struct {
// contains filtered or unexported fields
}
RegistryCache represents the in-memory storage of registries to limit duplication of remote.Registry and HTTP client objects.
func NewRegistryCache ¶
func NewRegistryCache() *RegistryCache
NewRegistryCache creates a new registry cache to store registry and client information.
func (*RegistryCache) AddRegistryToCache ¶
func (cache *RegistryCache) AddRegistryToCache(hostname string, r Registry)
AddRegistryToCache adds an entry to the cache.