Documentation
¶
Index ¶
- type CredentialHelper
- type Credentials
- type OCIRegistry
- func (r *OCIRegistry) Fetcher(ctx context.Context, ref string) (transfer.Fetcher, error)
- func (r *OCIRegistry) Image() string
- func (r *OCIRegistry) MarshalAny(ctx context.Context, sm streaming.StreamCreator) (typeurl.Any, error)
- func (r *OCIRegistry) Pusher(ctx context.Context, desc ocispec.Descriptor) (transfer.Pusher, error)
- func (r *OCIRegistry) Resolve(ctx context.Context) (name string, desc ocispec.Descriptor, err error)
- func (r *OCIRegistry) SetResolverOptions(options ...transfer.ImageResolverOption)
- func (r *OCIRegistry) String() string
- func (r *OCIRegistry) UnmarshalAny(ctx context.Context, sm streaming.StreamGetter, a typeurl.Any) error
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialHelper ¶
type CredentialHelper interface {
GetCredentials(ctx context.Context, ref, host string) (Credentials, error)
}
From stream
type Credentials ¶
type OCIRegistry ¶
type OCIRegistry struct {
// contains filtered or unexported fields
}
OCI
func NewOCIRegistry ¶
NewOCIRegistry initializes with hosts, authorizer callback, and headers
func (*OCIRegistry) Image ¶
func (r *OCIRegistry) Image() string
func (*OCIRegistry) MarshalAny ¶
func (r *OCIRegistry) MarshalAny(ctx context.Context, sm streaming.StreamCreator) (typeurl.Any, error)
func (*OCIRegistry) Pusher ¶
func (r *OCIRegistry) Pusher(ctx context.Context, desc ocispec.Descriptor) (transfer.Pusher, error)
func (*OCIRegistry) Resolve ¶
func (r *OCIRegistry) Resolve(ctx context.Context) (name string, desc ocispec.Descriptor, err error)
func (*OCIRegistry) SetResolverOptions ¶ added in v2.1.0
func (r *OCIRegistry) SetResolverOptions(options ...transfer.ImageResolverOption)
func (*OCIRegistry) String ¶
func (r *OCIRegistry) String() string
func (*OCIRegistry) UnmarshalAny ¶
func (r *OCIRegistry) UnmarshalAny(ctx context.Context, sm streaming.StreamGetter, a typeurl.Any) error
type Opt ¶
type Opt func(o *registryOpts) error
Opt sets registry-related configurations.
func WithClientStream ¶ added in v2.1.0
func WithClientStream(writer io.WriteCloser) Opt
WithClientStream tells the registry to stream HTTP debug data back to the client. Applicable only when HTTP debug or tracing enabled.
func WithCredentials ¶
func WithCredentials(creds CredentialHelper) Opt
WithCredentials configures a helper that provides credentials for a host.
func WithDefaultScheme ¶
WithDefaultScheme specifies the default scheme for registry configuration
func WithHTTPDebug ¶ added in v2.1.0
func WithHTTPDebug() Opt
WithHTTPDebug dumps requests made to an OCI registry. Useful to debug interactions between containerd and registry.
func WithHTTPTrace ¶ added in v2.1.0
func WithHTTPTrace() Opt
WithHTTPTrace traces HTTP events made to an OCI registry.
func WithHeaders ¶
WithHeaders configures HTTP request header fields sent by the resolver.
func WithHostDir ¶
WithHostDir specifies the host configuration directory.