Documentation ¶
Index ¶
- Constants
- func MarshalToDesc(data interface{}, mediaType string) (*ocispec.Descriptor, []byte, error)
- func PackTargz(src string, name string, compress bool) (io.ReadCloser, error)
- func PackTargzInfo(src, name string, compress bool) (digest.Digest, int64, error)
- func UnpackFile(reader io.Reader, source, target string) error
- func UnpackTargz(ctx context.Context, dst string, r io.Reader) error
- type Job
- type QueueWorkerPool
- type RJob
- type WorkerPool
Constants ¶
View Source
const ( ManifestOSFeatureNydus = "nydus.remoteimage.v1" MediaTypeNydusBlob = "application/vnd.oci.image.layer.nydus.blob.v1" BootstrapFileNameInLayer = "image/image.boot" ManifestNydusCache = "containerd.io/snapshot/nydus-cache" ManifestNydusCacheVersion = "v1" LayerAnnotationNydusBlob = "containerd.io/snapshot/nydus-blob" LayerAnnotationNydusBlobDigest = "containerd.io/snapshot/nydus-blob-digest" LayerAnnotationNydusBlobSize = "containerd.io/snapshot/nydus-blob-size" LayerAnnotationNydusBlobIDs = "containerd.io/snapshot/nydus-blob-ids" LayerAnnotationNydusBootstrap = "containerd.io/snapshot/nydus-bootstrap" LayerAnnotationNydusSourceChainID = "containerd.io/snapshot/nydus-source-chainid" LayerAnnotationUncompressed = "containerd.io/uncompressed" )
Variables ¶
This section is empty.
Functions ¶
func MarshalToDesc ¶
func MarshalToDesc(data interface{}, mediaType string) (*ocispec.Descriptor, []byte, error)
func PackTargzInfo ¶
PackTargzInfo makes .tar(.gz) stream of file named `name` and return digest and size
Types ¶
type QueueWorkerPool ¶
type QueueWorkerPool struct {
// contains filtered or unexported fields
}
QueueWorkerPool creates a worker pool with fixed count, caller puts some jobs to the pool by a fixed order and then wait all jobs finish by the previous order
func NewQueueWorkerPool ¶
func NewQueueWorkerPool(worker, total uint) *QueueWorkerPool
NewQueueWorkerPool creates a queued worker pool, `worker` is worker count, `total` is expected job count
func (*QueueWorkerPool) Put ¶
func (pool *QueueWorkerPool) Put(_job RJob) error
func (*QueueWorkerPool) Waiter ¶
func (pool *QueueWorkerPool) Waiter() []chan RJob
type WorkerPool ¶
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool creates a worker pool with fixed count, caller puts some jobs to the pool and then wait all jobs finish
func NewWorkerPool ¶
func NewWorkerPool(worker, total uint) *WorkerPool
NewWorkerPool creates a worker pool, `worker` is worker count, `total` is expected job count
func (*WorkerPool) Put ¶
func (pool *WorkerPool) Put(job Job) error
func (*WorkerPool) Wait ¶
func (pool *WorkerPool) Wait() error
Click to show internal directories.
Click to hide internal directories.