Documentation
¶
Index ¶
- Variables
- func IsStageNotFound(err error) bool
- func RetryOnStagesStorageCacheResetError(ctx context.Context, manager StorageManagerInterface, f func() error) error
- func ShouldResetStagesStorageCache(err error) bool
- type ForEachDeleteStageOptions
- type StagesList
- type StorageManager
- func (m *StorageManager) AtomicStoreStagesByDigestToCache(ctx context.Context, stageName, stageDigest string, stageIDs []image.StageID) error
- func (m *StorageManager) CopyStageIntoCache(ctx context.Context, stg stage.Interface, ...) error
- func (m *StorageManager) CopyStageIntoFinalRepo(ctx context.Context, stg stage.Interface, ...) error
- func (m *StorageManager) CopySuitableByDigestStage(ctx context.Context, stageDesc *image.StageDescription, ...) (*image.StageDescription, error)
- func (m *StorageManager) EnableParallel(parallelTasksLimit int)
- func (m *StorageManager) FetchStage(ctx context.Context, containerRuntime container_runtime.ContainerRuntime, ...) error
- func (m *StorageManager) ForEachDeleteFinalStage(ctx context.Context, options ForEachDeleteStageOptions, ...) error
- func (m *StorageManager) ForEachDeleteStage(ctx context.Context, options ForEachDeleteStageOptions, ...) error
- func (m *StorageManager) ForEachGetImportMetadata(ctx context.Context, projectName string, ids []string, ...) error
- func (m *StorageManager) ForEachGetStageCustomTagMetadata(ctx context.Context, ids []string, ...) error
- func (m *StorageManager) ForEachRmImageMetadata(ctx context.Context, projectName, imageNameOrID string, ...) error
- func (m *StorageManager) ForEachRmImportMetadata(ctx context.Context, projectName string, ids []string, ...) error
- func (m *StorageManager) ForEachRmManagedImage(ctx context.Context, projectName string, managedImages []string, ...) error
- func (m *StorageManager) GenerateStageUniqueID(digest string, stages []*image.StageDescription) (string, int64)
- func (m *StorageManager) GetFinalStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)
- func (m *StorageManager) GetFinalStagesStorage() storage.StagesStorage
- func (m *StorageManager) GetImageInfoGetter(imageName string, stg stage.Interface) *image.InfoGetter
- func (m *StorageManager) GetSecondaryStagesStorageList() []storage.StagesStorage
- func (m *StorageManager) GetStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)
- func (m *StorageManager) GetStagesByDigest(ctx context.Context, stageName, stageDigest string) ([]*image.StageDescription, error)
- func (m *StorageManager) GetStagesByDigestFromStagesStorage(ctx context.Context, stageName, stageDigest string, ...) ([]*image.StageDescription, error)
- func (m *StorageManager) GetStagesStorage() storage.StagesStorage
- func (m *StorageManager) InitCache(ctx context.Context) error
- func (m *StorageManager) LockStageImage(ctx context.Context, imageName string) error
- func (m *StorageManager) MaxNumberOfWorkers() int
- func (m *StorageManager) ResetStagesStorageCache(ctx context.Context) error
- func (m *StorageManager) SelectSuitableStage(ctx context.Context, c stage.Conveyor, stg stage.Interface, ...) (*image.StageDescription, error)
- type StorageManagerInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrShouldResetStagesStorageCache = errors.New("should reset storage cache") ErrStageNotFound = errors.New("stage not found") )
Functions ¶
func IsStageNotFound ¶ added in v1.2.13
func RetryOnStagesStorageCacheResetError ¶ added in v1.2.25
func RetryOnStagesStorageCacheResetError(ctx context.Context, manager StorageManagerInterface, f func() error) error
Types ¶
type ForEachDeleteStageOptions ¶
type ForEachDeleteStageOptions struct {
storage.DeleteImageOptions
storage.FilterStagesAndProcessRelatedDataOptions
}
type StagesList ¶ added in v1.2.16
func NewStagesList ¶ added in v1.2.16
func NewStagesList(stageIDs []image.StageID) *StagesList
func (*StagesList) AddStageID ¶ added in v1.2.16
func (stages *StagesList) AddStageID(stageID image.StageID)
func (*StagesList) GetStageIDs ¶ added in v1.2.16
func (stages *StagesList) GetStageIDs() []image.StageID
type StorageManager ¶
type StorageManager struct {
ProjectName string
StorageLockManager storage.LockManager
StagesStorageCache storage.StagesStorageCache
StagesStorage storage.StagesStorage
FinalStagesStorage storage.StagesStorage
CacheStagesStorageList []storage.StagesStorage
SecondaryStagesStorageList []storage.StagesStorage
SharedHostImagesLocks []lockgate.LockHandle
FinalStagesListCacheMux sync.Mutex
FinalStagesListCache *StagesList
// contains filtered or unexported fields
}
func NewStorageManager ¶
func NewStorageManager(projectName string, stagesStorage storage.StagesStorage, finalStagesStorage storage.StagesStorage, secondaryStagesStorageList []storage.StagesStorage, cacheStagesStorageList []storage.StagesStorage, storageLockManager storage.LockManager, stagesStorageCache storage.StagesStorageCache) *StorageManager
func (*StorageManager) AtomicStoreStagesByDigestToCache ¶ added in v1.2.13
func (*StorageManager) CopyStageIntoCache ¶ added in v1.2.13
func (m *StorageManager) CopyStageIntoCache(ctx context.Context, stg stage.Interface, containerRuntime container_runtime.ContainerRuntime) error
func (*StorageManager) CopyStageIntoFinalRepo ¶ added in v1.2.16
func (m *StorageManager) CopyStageIntoFinalRepo(ctx context.Context, stg stage.Interface, containerRuntime container_runtime.ContainerRuntime) error
func (*StorageManager) CopySuitableByDigestStage ¶ added in v1.2.13
func (m *StorageManager) CopySuitableByDigestStage(ctx context.Context, stageDesc *image.StageDescription, sourceStagesStorage, destinationStagesStorage storage.StagesStorage, containerRuntime container_runtime.ContainerRuntime) (*image.StageDescription, error)
func (*StorageManager) EnableParallel ¶ added in v1.2.0
func (m *StorageManager) EnableParallel(parallelTasksLimit int)
func (*StorageManager) FetchStage ¶ added in v1.2.13
func (m *StorageManager) FetchStage(ctx context.Context, containerRuntime container_runtime.ContainerRuntime, stg stage.Interface) error
func (*StorageManager) ForEachDeleteFinalStage ¶ added in v1.2.16
func (m *StorageManager) ForEachDeleteFinalStage(ctx context.Context, options ForEachDeleteStageOptions, stagesDescriptions []*image.StageDescription, f func(ctx context.Context, stageDesc *image.StageDescription, err error) error) error
func (*StorageManager) ForEachDeleteStage ¶ added in v1.2.13
func (m *StorageManager) ForEachDeleteStage(ctx context.Context, options ForEachDeleteStageOptions, stagesDescriptions []*image.StageDescription, f func(ctx context.Context, stageDesc *image.StageDescription, err error) error) error
func (*StorageManager) ForEachGetImportMetadata ¶ added in v1.2.13
func (*StorageManager) ForEachGetStageCustomTagMetadata ¶ added in v1.2.28
func (*StorageManager) ForEachRmImageMetadata ¶ added in v1.2.13
func (*StorageManager) ForEachRmImportMetadata ¶ added in v1.2.13
func (*StorageManager) ForEachRmManagedImage ¶ added in v1.2.13
func (*StorageManager) GenerateStageUniqueID ¶ added in v1.2.13
func (m *StorageManager) GenerateStageUniqueID(digest string, stages []*image.StageDescription) (string, int64)
func (*StorageManager) GetFinalStageDescriptionList ¶ added in v1.2.16
func (m *StorageManager) GetFinalStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)
func (*StorageManager) GetFinalStagesStorage ¶ added in v1.2.16
func (m *StorageManager) GetFinalStagesStorage() storage.StagesStorage
func (*StorageManager) GetImageInfoGetter ¶ added in v1.2.16
func (m *StorageManager) GetImageInfoGetter(imageName string, stg stage.Interface) *image.InfoGetter
func (*StorageManager) GetSecondaryStagesStorageList ¶ added in v1.2.16
func (m *StorageManager) GetSecondaryStagesStorageList() []storage.StagesStorage
func (*StorageManager) GetStageDescriptionList ¶ added in v1.2.13
func (m *StorageManager) GetStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)
func (*StorageManager) GetStagesByDigest ¶ added in v1.2.13
func (m *StorageManager) GetStagesByDigest(ctx context.Context, stageName, stageDigest string) ([]*image.StageDescription, error)
func (*StorageManager) GetStagesByDigestFromStagesStorage ¶ added in v1.2.13
func (m *StorageManager) GetStagesByDigestFromStagesStorage(ctx context.Context, stageName, stageDigest string, stagesStorage storage.StagesStorage) ([]*image.StageDescription, error)
func (*StorageManager) GetStagesStorage ¶ added in v1.2.16
func (m *StorageManager) GetStagesStorage() storage.StagesStorage
func (*StorageManager) InitCache ¶ added in v1.2.16
func (m *StorageManager) InitCache(ctx context.Context) error
func (*StorageManager) LockStageImage ¶ added in v1.2.13
func (m *StorageManager) LockStageImage(ctx context.Context, imageName string) error
func (*StorageManager) MaxNumberOfWorkers ¶ added in v1.2.0
func (m *StorageManager) MaxNumberOfWorkers() int
func (*StorageManager) ResetStagesStorageCache ¶ added in v1.2.13
func (m *StorageManager) ResetStagesStorageCache(ctx context.Context) error
func (*StorageManager) SelectSuitableStage ¶ added in v1.2.13
func (m *StorageManager) SelectSuitableStage(ctx context.Context, c stage.Conveyor, stg stage.Interface, stages []*image.StageDescription) (*image.StageDescription, error)
type StorageManagerInterface ¶ added in v1.2.16
type StorageManagerInterface interface {
InitCache(ctx context.Context) error
GetStagesStorage() storage.StagesStorage
GetFinalStagesStorage() storage.StagesStorage
GetSecondaryStagesStorageList() []storage.StagesStorage
GetImageInfoGetter(imageName string, stg stage.Interface) *image.InfoGetter
EnableParallel(parallelTasksLimit int)
MaxNumberOfWorkers() int
GenerateStageUniqueID(digest string, stages []*image.StageDescription) (string, int64)
LockStageImage(ctx context.Context, imageName string) error
AtomicStoreStagesByDigestToCache(ctx context.Context, stageName, stageDigest string, stageIDs []image.StageID) error
GetStagesByDigest(ctx context.Context, stageName, stageDigest string) ([]*image.StageDescription, error)
GetStagesByDigestFromStagesStorage(ctx context.Context, stageName, stageDigest string, stagesStorage storage.StagesStorage) ([]*image.StageDescription, error)
GetStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)
GetFinalStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)
ResetStagesStorageCache(ctx context.Context) error
FetchStage(ctx context.Context, containerRuntime container_runtime.ContainerRuntime, stg stage.Interface) error
SelectSuitableStage(ctx context.Context, c stage.Conveyor, stg stage.Interface, stages []*image.StageDescription) (*image.StageDescription, error)
CopySuitableByDigestStage(ctx context.Context, stageDesc *image.StageDescription, sourceStagesStorage, destinationStagesStorage storage.StagesStorage, containerRuntime container_runtime.ContainerRuntime) (*image.StageDescription, error)
CopyStageIntoCache(ctx context.Context, stg stage.Interface, containerRuntime container_runtime.ContainerRuntime) error
CopyStageIntoFinalRepo(ctx context.Context, stg stage.Interface, containerRuntime container_runtime.ContainerRuntime) error
ForEachDeleteStage(ctx context.Context, options ForEachDeleteStageOptions, stagesDescriptions []*image.StageDescription, f func(ctx context.Context, stageDesc *image.StageDescription, err error) error) error
ForEachDeleteFinalStage(ctx context.Context, options ForEachDeleteStageOptions, stagesDescriptions []*image.StageDescription, f func(ctx context.Context, stageDesc *image.StageDescription, err error) error) error
ForEachRmImageMetadata(ctx context.Context, projectName, imageNameOrID string, stageIDCommitList map[string][]string, f func(ctx context.Context, commit, stageID string, err error) error) error
ForEachRmManagedImage(ctx context.Context, projectName string, managedImages []string, f func(ctx context.Context, managedImage string, err error) error) error
ForEachGetImportMetadata(ctx context.Context, projectName string, ids []string, f func(ctx context.Context, metadataID string, metadata *storage.ImportMetadata, err error) error) error
ForEachRmImportMetadata(ctx context.Context, projectName string, ids []string, f func(ctx context.Context, id string, err error) error) error
ForEachGetStageCustomTagMetadata(ctx context.Context, ids []string, f func(ctx context.Context, metadataID string, metadata *storage.CustomTagMetadata, err error) error) error
}
Click to show internal directories.
Click to hide internal directories.