Documentation
¶
Overview ¶
Package docker implements the OCI / Docker registry mirror backend.
Registries require a bearer token for pulls: GET /v2/ returns 401 with a WWW-Authenticate header pointing at the token endpoint. The backend fetches a token when challenged and passes it on every subsequent request. Resolve returns the blob URL together with the Authorization header needed to fetch it.
Index ¶
- Constants
- type Detail
- type Service
- func (s *Service) Package(ctx context.Context, mirror string, q core.PackageQuery) (core.PackageResult, error)
- func (s *Service) Resolve(ctx context.Context, mirror string, q core.PackageQuery) (core.DownloadResult, error)
- func (s *Service) Speed(ctx context.Context, mirror string, o core.SpeedOptions) (core.SpeedResult, error)
- func (s *Service) Status(ctx context.Context, mirror string) (core.StatusResult, error)
Constants ¶
const DefaultSpeedDuration = 10 * time.Second
DefaultSpeedDuration bounds a speed-test download.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detail ¶
type Detail struct {
Tags []string `json:"tags,omitempty"`
TotalTags int `json:"total_tags,omitempty"`
Digest string `json:"digest,omitempty"`
LayerCount int `json:"layer_count,omitempty"`
}
Detail is docker's PackageResult.Detail payload.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements core.Prober for OCI registries.
func (*Service) Package ¶
func (s *Service) Package(ctx context.Context, mirror string, q core.PackageQuery) (core.PackageResult, error)
Package lists tags for an image.
func (*Service) Resolve ¶
func (s *Service) Resolve(ctx context.Context, mirror string, q core.PackageQuery) (core.DownloadResult, error)
Resolve returns the direct blob URL plus the Authorization header needed to fetch it.