Documentation ¶
Index ¶
- func AddBlobsToContentTreeStatus(ctx *volumemgrContext, status *types.ContentTreeStatus, blobShas ...string) error
- func AddOrRefcountDownloaderConfig(ctx *volumemgrContext, blob types.BlobStatus)
- func AddRefToBlobStatus(ctx *volumemgrContext, blobStatus ...*types.BlobStatus)
- func AddWorkCreate(ctx *volumemgrContext, status *types.VolumeStatus)
- func AddWorkDestroy(ctx *volumemgrContext, status *types.VolumeStatus)
- func AddWorkLoad(ctx *volumemgrContext, status *types.ContentTreeStatus)
- func AddWorkPrepare(ctx *volumemgrContext, status *types.VolumeStatus)
- func DeleteWorkCreate(ctx *volumemgrContext, status *types.VolumeStatus)
- func DeleteWorkDestroy(ctx *volumemgrContext, status *types.VolumeStatus)
- func DeleteWorkLoad(ctx *volumemgrContext, key string)
- func DeleteWorkPrepare(ctx *volumemgrContext, status *types.VolumeStatus)
- func MaybeAddResolveConfig(ctx *volumemgrContext, cs types.ContentTreeStatus)
- func MaybeAddVerifyImageConfigBlob(ctx *volumemgrContext, blob types.BlobStatus) (bool, types.ErrorAndTime)
- func MaybeRemoveDownloaderConfig(ctx *volumemgrContext, imageSha string)
- func MaybeRemoveVerifyImageConfig(ctx *volumemgrContext, imageSha string)
- func RemoveAllBlobsFromContentTreeStatus(ctx *volumemgrContext, status *types.ContentTreeStatus, blobShas ...string)
- func RemoveRefFromBlobStatus(ctx *volumemgrContext, blobStatus ...*types.BlobStatus)
- func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, ...) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBlobsToContentTreeStatus ¶
func AddBlobsToContentTreeStatus(ctx *volumemgrContext, status *types.ContentTreeStatus, blobShas ...string) error
AddBlobsToContentTreeStatus adds blob to ContentTreeStatus.Blobs also increments RefCount of the respective BlobStatus. NOTE: This should be the only method to add blobs into ContentTreeStatus.Blobs
func AddOrRefcountDownloaderConfig ¶
func AddOrRefcountDownloaderConfig(ctx *volumemgrContext, blob types.BlobStatus)
AddOrRefcountDownloaderConfig used to publish the downloader config
func AddRefToBlobStatus ¶
func AddRefToBlobStatus(ctx *volumemgrContext, blobStatus ...*types.BlobStatus)
AddRefToBlobStatus adds the refObject as an reference to the blobs in the given blob list.
func AddWorkCreate ¶
func AddWorkCreate(ctx *volumemgrContext, status *types.VolumeStatus)
AddWorkCreate adds a Work job to create a volume
func AddWorkDestroy ¶
func AddWorkDestroy(ctx *volumemgrContext, status *types.VolumeStatus)
AddWorkDestroy adds a Work job to destroy a volume
func AddWorkLoad ¶
func AddWorkLoad(ctx *volumemgrContext, status *types.ContentTreeStatus)
AddWorkLoad adds a Work job to load an image and blobs into CAS
func AddWorkPrepare ¶
func AddWorkPrepare(ctx *volumemgrContext, status *types.VolumeStatus)
AddWorkPrepare adds a Work job to create a volume
func DeleteWorkCreate ¶
func DeleteWorkCreate(ctx *volumemgrContext, status *types.VolumeStatus)
DeleteWorkCreate is called by user when work is done
func DeleteWorkDestroy ¶
func DeleteWorkDestroy(ctx *volumemgrContext, status *types.VolumeStatus)
DeleteWorkDestroy cancels a job to destroy a volume
func DeleteWorkLoad ¶
func DeleteWorkLoad(ctx *volumemgrContext, key string)
DeleteWorkLoad is called by user when work is done
func DeleteWorkPrepare ¶
func DeleteWorkPrepare(ctx *volumemgrContext, status *types.VolumeStatus)
DeleteWorkPrepare is called by user when work is done
func MaybeAddResolveConfig ¶
func MaybeAddResolveConfig(ctx *volumemgrContext, cs types.ContentTreeStatus)
MaybeAddResolveConfig will publish the resolve config for container images for which resolution of tags to sha requires
func MaybeAddVerifyImageConfigBlob ¶
func MaybeAddVerifyImageConfigBlob(ctx *volumemgrContext, blob types.BlobStatus) (bool, types.ErrorAndTime)
MaybeAddVerifyImageConfigBlob publishes the verifier config
func MaybeRemoveDownloaderConfig ¶
func MaybeRemoveDownloaderConfig(ctx *volumemgrContext, imageSha string)
MaybeRemoveDownloaderConfig decrements Refcount of the given DownloaderConfig. If the Refcount of a DownloaderConfig reaches zero, the following sequence of handshake is performed before deleting DownloaderConfig: 1. volumeMgr publishes DownloaderConfig with Refcount = 0. 2. Downloader replies with a expired DownloaderStatus (RefCount = 0). 3. volumeMgr deletes the respective DownloaderConfig after receiving expired DownloaderStatus. 4. Downloader receives the delete notification and deletes DownloaderStatus along with the downloaded file.
Note: > If download was in progress after #1, then the download progress notification for the DownloaderStatus will be ignored silently. > If DownloaderConfig's Refcount was incremented before #3, then expired notification from the Downloader will be ignored silently.
func MaybeRemoveVerifyImageConfig ¶
func MaybeRemoveVerifyImageConfig(ctx *volumemgrContext, imageSha string)
MaybeRemoveVerifyImageConfig decreases the refcount The object deletion handshake doesn't start until deleteVerifyImageConfig is called which we do when the refcount reaches zero. However, MaybeAddVerifyImageConfig can be called to increment the refcount since the handshake with the verifier will not conclude until the VerifyImageConfig is unpublished
func RemoveAllBlobsFromContentTreeStatus ¶
func RemoveAllBlobsFromContentTreeStatus(ctx *volumemgrContext, status *types.ContentTreeStatus, blobShas ...string)
RemoveAllBlobsFromContentTreeStatus removes all the blob from ContentTreeStatus.Blobs also decrements RefCount of the respective BlobStatus. NOTE: This should be the only method to remove blobs from ContentTreeStatus.Blobs
func RemoveRefFromBlobStatus ¶
func RemoveRefFromBlobStatus(ctx *volumemgrContext, blobStatus ...*types.BlobStatus)
RemoveRefFromBlobStatus removes the reference from the blobs in the given blob list.
Types ¶
This section is empty.