Documentation ¶
Index ¶
- Constants
- func NewResolver(insecure, plainHTTP bool, credFunc CredentialFunc) remotes.Resolver
- func RetryWithHTTP(err error) bool
- func WithRetry(op func() error) error
- type CredentialFunc
- type HostFunc
- type Remote
- func (remote *Remote) IsWithHTTP() bool
- func (remote *Remote) MaybeWithHTTP(err error)
- func (remote *Remote) Pull(ctx context.Context, desc ocispec.Descriptor, byDigest bool) (io.ReadCloser, error)
- func (remote *Remote) Push(ctx context.Context, desc ocispec.Descriptor, byDigest bool, reader io.Reader) error
- func (remote *Remote) Resolve(ctx context.Context) (*ocispec.Descriptor, error)
Constants ¶
View Source
const ChunkSize int64 = 500 * 1024 * 1024
We always use multipart upload for backend, and limit the multipart chunk size to 500MB by default.
Variables ¶
This section is empty.
Functions ¶
func NewResolver ¶
func NewResolver(insecure, plainHTTP bool, credFunc CredentialFunc) remotes.Resolver
func RetryWithHTTP ¶
Types ¶
type CredentialFunc ¶
CredentialFunc accepts host url parameter and returns with username, password and error.
func NewDockerConfigCredFunc ¶
func NewDockerConfigCredFunc() CredentialFunc
NewDockerConfigCredFunc attempts to read docker auth config file `$DOCKER_CONFIG/config.json` to communicate with remote registry, `$DOCKER_CONFIG` defaults to `~/.docker`.
type HostFunc ¶
type HostFunc = func(ref string) (CredentialFunc, bool, error)
HostFunc accepts host url parameter and returns with CredentialFunc, insecure and error.
type Remote ¶
type Remote struct { // `Ref` is pointing to a remote image in formatted string host[:port]/[namespace/]repo[:tag] Ref string // contains filtered or unexported fields }
Remote provides the ability to access remote registry
func (*Remote) IsWithHTTP ¶
func (*Remote) MaybeWithHTTP ¶
func (*Remote) Pull ¶
func (remote *Remote) Pull(ctx context.Context, desc ocispec.Descriptor, byDigest bool) (io.ReadCloser, error)
Pull pulls blob from registry
Click to show internal directories.
Click to hide internal directories.