manager

package
v1.2.0-alpha14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShouldResetStagesStorageCache = errors.New("should reset stages storage cache")

Functions

func ShouldResetStagesStorageCache

func ShouldResetStagesStorageCache(err error) bool

func SyncStages

func SyncStages(ctx context.Context, projectName string, fromStagesStorage storage.StagesStorage, toStagesStorage storage.StagesStorage, storageLockManager storage.LockManager, containerRuntime container_runtime.ContainerRuntime, opts SyncStagesOptions) error

SyncStages will make sure, that destination stages storage contains all stages from source stages storage. Repeatedly calling SyncStages will copy stages from source stages storage to destination, that already exists in the destination. SyncStages will not delete excess stages from destination storage, that does not exists in the source.

Types

type StagesStorageManager

type StagesStorageManager struct {
	StagesSwitchFromLocalBlockDir string
	ProjectName                   string

	StorageLockManager storage.LockManager
	StagesStorage      storage.StagesStorage
	StagesStorageCache storage.StagesStorageCache
	// contains filtered or unexported fields
}

func (*StagesStorageManager) AtomicStoreStagesByDigestToCache added in v1.2.0

func (m *StagesStorageManager) AtomicStoreStagesByDigestToCache(ctx context.Context, stageName, stageSig string, stageIDs []image.StageID) error

func (*StagesStorageManager) EnableParallel

func (m *StagesStorageManager) EnableParallel(parallelTasksLimit int)

func (*StagesStorageManager) FetchStage

func (m *StagesStorageManager) FetchStage(ctx context.Context, stg stage.Interface) error

func (*StagesStorageManager) ForEachDeleteStage

func (m *StagesStorageManager) ForEachDeleteStage(ctx context.Context, options ForEachDeleteStageOptions, stagesDescriptions []*image.StageDescription, f func(ctx context.Context, stageDesc *image.StageDescription, err error) error) error

func (*StagesStorageManager) ForEachRmImageMetadata added in v1.2.0

func (m *StagesStorageManager) ForEachRmImageMetadata(ctx context.Context, projectName, imageNameOrID string, stageIDCommitList map[string][]string, f func(ctx context.Context, commit, stageID string, err error) error) error

func (*StagesStorageManager) ForEachRmManagedImage added in v1.2.0

func (m *StagesStorageManager) ForEachRmManagedImage(ctx context.Context, projectName string, managedImages []string, f func(ctx context.Context, managedImage string, err error) error) error

func (*StagesStorageManager) GenerateStageUniqueID

func (m *StagesStorageManager) GenerateStageUniqueID(digest string, stages []*image.StageDescription) (string, int64)

func (*StagesStorageManager) GetStageDescriptionList added in v1.2.0

func (m *StagesStorageManager) GetStageDescriptionList(ctx context.Context) ([]*image.StageDescription, error)

func (*StagesStorageManager) GetStagesByDigest added in v1.2.0

func (m *StagesStorageManager) GetStagesByDigest(ctx context.Context, stageName, stageSig string) ([]*image.StageDescription, error)

func (*StagesStorageManager) MaxNumberOfWorkers

func (m *StagesStorageManager) MaxNumberOfWorkers() int

func (*StagesStorageManager) ResetStagesStorageCache

func (m *StagesStorageManager) ResetStagesStorageCache(ctx context.Context) error

func (*StagesStorageManager) SelectSuitableStage

func (*StagesStorageManager) SetStagesSwitchFromLocalBlock

func (m *StagesStorageManager) SetStagesSwitchFromLocalBlock(ctx context.Context, newStagesStorage storage.StagesStorage) error

func (*StagesStorageManager) UseStagesStorage

func (m *StagesStorageManager) UseStagesStorage(ctx context.Context, stagesStorage storage.StagesStorage) error

type StorageManager

type StorageManager struct {
	*StagesStorageManager
}

func NewStorageManager

func NewStorageManager(projectName string, storageLockManager storage.LockManager, stagesStorageCache storage.StagesStorageCache) *StorageManager

func (StorageManager) EnableParallel added in v1.2.0

func (m StorageManager) EnableParallel(parallelTasksLimit int)

func (StorageManager) MaxNumberOfWorkers added in v1.2.0

func (m StorageManager) MaxNumberOfWorkers() int

type SyncStagesOptions

type SyncStagesOptions struct {
	RemoveSource      bool
	CleanupLocalCache bool
	WithoutLock       bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL