Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct { registry.ReferenceFetcher *cas.Proxy }
Proxy is a caching proxy dedicated for registry.ReferenceFetcher. The first fetch call of a described content will read from the remote and cache the fetched content. The subsequent fetch call will read from the local cache.
func NewProxy ¶
func NewProxy(base ReferenceStorage, cache content.Storage) *Proxy
NewProxy creates a proxy for the `base` ReferenceStorage, using the `cache` storage as the cache.
func (*Proxy) FetchReference ¶
func (p *Proxy) FetchReference(ctx context.Context, reference string) (ocispec.Descriptor, io.ReadCloser, error)
FetchReference fetches the content identified by the reference from the remote and cache the fetched content.
type ReferenceStorage ¶
type ReferenceStorage interface { content.ReadOnlyStorage registry.ReferenceFetcher }
ReferenceStorage represents a CAS that supports registry.ReferenceFetcher.
Click to show internal directories.
Click to hide internal directories.