Documentation ¶
Index ¶
- func NewTransferService(lm leases.Manager, cs content.Store, is images.Store, tc *TransferConfig) transfer.Transferrer
- type ActiveJobs
- type ProgressTracker
- func (j *ProgressTracker) Add(desc ocispec.Descriptor)
- func (j *ProgressTracker) AddChildren(desc ocispec.Descriptor, children []ocispec.Descriptor)
- func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.ProgressFunc, pt StatusTracker)
- func (j *ProgressTracker) MarkExists(desc ocispec.Descriptor)
- func (j *ProgressTracker) Wait()
- type StatusTracker
- type TransferConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransferService ¶
func NewTransferService(lm leases.Manager, cs content.Store, is images.Store, tc *TransferConfig) transfer.Transferrer
Types ¶
type ProgressTracker ¶
type ProgressTracker struct {
// contains filtered or unexported fields
}
func NewProgressTracker ¶
func NewProgressTracker(root, transferState string) *ProgressTracker
NewProgressTracker tracks content download progress
func (*ProgressTracker) Add ¶
func (j *ProgressTracker) Add(desc ocispec.Descriptor)
Add adds a descriptor to be tracked
func (*ProgressTracker) AddChildren ¶
func (j *ProgressTracker) AddChildren(desc ocispec.Descriptor, children []ocispec.Descriptor)
Adds hierarchy information
func (*ProgressTracker) HandleProgress ¶
func (j *ProgressTracker) HandleProgress(ctx context.Context, pf transfer.ProgressFunc, pt StatusTracker)
func (*ProgressTracker) MarkExists ¶
func (j *ProgressTracker) MarkExists(desc ocispec.Descriptor)
func (*ProgressTracker) Wait ¶
func (j *ProgressTracker) Wait()
type StatusTracker ¶
type StatusTracker interface { Active(context.Context, ...string) (ActiveJobs, error) Check(context.Context, digest.Digest) (bool, error) }
func NewContentStatusTracker ¶
func NewContentStatusTracker(cs content.Store) StatusTracker
type TransferConfig ¶
type TransferConfig struct { // MaxConcurrentDownloads is the max concurrent content downloads for pull. MaxConcurrentDownloads int // MaxConcurrentUploadedLayers is the max concurrent uploads for push MaxConcurrentUploadedLayers int // DuplicationSuppressor is used to make sure that there is only one // in-flight fetch request or unpack handler for a given descriptor's // digest or chain ID. DuplicationSuppressor kmutex.KeyedLocker // BaseHandlers are a set of handlers which get are called on dispatch. // These handlers always get called before any operation specific // handlers. BaseHandlers []images.Handler // UnpackPlatforms are used to specify supported combination of platforms and snapshotters UnpackPlatforms []unpack.Platform // RegistryConfigPath is a path to the root directory containing registry-specific configurations RegistryConfigPath string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.