Documentation ¶
Index ¶
- Constants
- Variables
- func BrokenImageErr(err error) bool
- func IsImageDeletionFailedDueToUsingByContainerErr(err error) bool
- type ClientIDRecord
- type CustomTagMetadata
- type DeleteImageOptions
- type DockerServerStagesStorage
- func (storage *DockerServerStagesStorage) AddManagedImage(_ context.Context, _, _ string) error
- func (storage *DockerServerStagesStorage) AddStageCustomTag(_ context.Context, _ *image.StageDescription, _ string) error
- func (storage *DockerServerStagesStorage) Address() string
- func (storage *DockerServerStagesStorage) CheckStageCustomTag(_ context.Context, _ *image.StageDescription, _ string) error
- func (storage *DockerServerStagesStorage) ConstructStageImageName(projectName, digest string, uniqueID int64) string
- func (storage *DockerServerStagesStorage) CreateRepo(_ context.Context) error
- func (storage *DockerServerStagesStorage) DeleteRepo(_ context.Context) error
- func (storage *DockerServerStagesStorage) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, ...) error
- func (storage *DockerServerStagesStorage) DeleteStageCustomTag(_ context.Context, _ string) error
- func (storage *DockerServerStagesStorage) ExportStage(ctx context.Context, stageDescription *image.StageDescription, ...) error
- func (storage *DockerServerStagesStorage) FetchImage(_ context.Context, _ container_runtime.LegacyImageInterface) error
- func (storage *DockerServerStagesStorage) FilterStagesAndProcessRelatedData(ctx context.Context, stageDescriptions []*image.StageDescription, ...) ([]*image.StageDescription, error)
- func (storage *DockerServerStagesStorage) GetAllAndGroupImageMetadataByImageName(_ context.Context, _ string, _ []string) (map[string]map[string][]string, map[string]map[string][]string, error)
- func (storage *DockerServerStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
- func (storage *DockerServerStagesStorage) GetImportMetadata(ctx context.Context, projectName, id string) (*ImportMetadata, error)
- func (storage *DockerServerStagesStorage) GetImportMetadataIDs(ctx context.Context, projectName string) ([]string, error)
- func (storage *DockerServerStagesStorage) GetManagedImages(_ context.Context, _ string) ([]string, error)
- func (storage *DockerServerStagesStorage) GetStageCustomTagMetadata(_ context.Context, _ string) (*CustomTagMetadata, error)
- func (storage *DockerServerStagesStorage) GetStageCustomTagMetadataIDs(_ context.Context) ([]string, error)
- func (storage *DockerServerStagesStorage) GetStageDescription(ctx context.Context, projectName, digest string, uniqueID int64) (*image.StageDescription, error)
- func (storage *DockerServerStagesStorage) GetStagesIDs(ctx context.Context, projectName string) ([]image.StageID, error)
- func (storage *DockerServerStagesStorage) GetStagesIDsByDigest(ctx context.Context, projectName, digest string) ([]image.StageID, error)
- func (storage *DockerServerStagesStorage) IsImageMetadataExist(_ context.Context, _, _, _, _ string) (bool, error)
- func (storage *DockerServerStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
- func (storage *DockerServerStagesStorage) PutImageMetadata(_ context.Context, _, _, _, _ string) error
- func (storage *DockerServerStagesStorage) PutImportMetadata(ctx context.Context, projectName string, metadata *ImportMetadata) error
- func (storage *DockerServerStagesStorage) RejectStage(_ context.Context, _, _ string, _ int64) error
- func (storage *DockerServerStagesStorage) RmImageMetadata(_ context.Context, _, _, _, _ string) error
- func (storage *DockerServerStagesStorage) RmImportMetadata(ctx context.Context, projectName, id string) error
- func (storage *DockerServerStagesStorage) RmManagedImage(_ context.Context, _, _ string) error
- func (storage *DockerServerStagesStorage) ShouldFetchImage(_ context.Context, _ container_runtime.LegacyImageInterface) (bool, error)
- func (storage *DockerServerStagesStorage) StoreImage(ctx context.Context, img container_runtime.LegacyImageInterface) error
- func (storage *DockerServerStagesStorage) String() string
- type FileStagesStorageCache
- func (cache *FileStagesStorageCache) DeleteAllStages(_ context.Context, projectName string) error
- func (cache *FileStagesStorageCache) DeleteStagesByDigest(ctx context.Context, projectName, digest string) error
- func (cache *FileStagesStorageCache) GetAllStages(ctx context.Context, projectName string) (bool, []image.StageID, error)
- func (cache *FileStagesStorageCache) GetStagesByDigest(ctx context.Context, projectName, digest string) (bool, []image.StageID, error)
- func (cache *FileStagesStorageCache) StoreStagesByDigest(ctx context.Context, projectName, digest string, stages []image.StageID) error
- func (cache *FileStagesStorageCache) String() string
- type FilterStagesAndProcessRelatedDataOptions
- type GenericLockManager
- func (manager *GenericLockManager) LockStage(ctx context.Context, projectName, digest string) (LockHandle, error)
- func (manager *GenericLockManager) LockStageCache(ctx context.Context, projectName, digest string) (LockHandle, error)
- func (manager *GenericLockManager) Unlock(ctx context.Context, lock LockHandle) error
- type ImageMetadata
- type ImportMetadata
- type KubernetesLockManager
- func (manager *KubernetesLockManager) LockStage(ctx context.Context, projectName, digest string) (LockHandle, error)
- func (manager *KubernetesLockManager) LockStageCache(ctx context.Context, projectName, digest string) (LockHandle, error)
- func (manager *KubernetesLockManager) Unlock(ctx context.Context, lock LockHandle) error
- type KubernetesStagesStorageCache
- func (cache *KubernetesStagesStorageCache) DeleteAllStages(ctx context.Context, projectName string) error
- func (cache *KubernetesStagesStorageCache) DeleteStagesByDigest(ctx context.Context, projectName, digest string) error
- func (cache *KubernetesStagesStorageCache) GetAllStages(ctx context.Context, projectName string) (bool, []image.StageID, error)
- func (cache *KubernetesStagesStorageCache) GetStagesByDigest(ctx context.Context, projectName, digest string) (bool, []image.StageID, error)
- func (cache *KubernetesStagesStorageCache) StoreStagesByDigest(ctx context.Context, projectName, digest string, stages []image.StageID) error
- func (cache *KubernetesStagesStorageCache) String() string
- type KubernetesStagesStorageCacheData
- type KubernetesStagesStorageCacheOptions
- type KubernetesSynchronizationParams
- type LockHandle
- type LockManager
- type LockStagesAndImagesOptions
- type RepoStagesStorage
- func (storage *RepoStagesStorage) AddManagedImage(ctx context.Context, projectName, imageName string) error
- func (storage *RepoStagesStorage) AddStageCustomTag(ctx context.Context, stageDescription *image.StageDescription, tag string) error
- func (storage *RepoStagesStorage) Address() string
- func (storage *RepoStagesStorage) CheckStageCustomTag(ctx context.Context, stageDescription *image.StageDescription, tag string) error
- func (storage *RepoStagesStorage) ConstructStageImageName(_, digest string, uniqueID int64) string
- func (storage *RepoStagesStorage) CreateRepo(ctx context.Context) error
- func (storage *RepoStagesStorage) DeleteRepo(ctx context.Context) error
- func (storage *RepoStagesStorage) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, ...) error
- func (storage *RepoStagesStorage) DeleteStageCustomTag(ctx context.Context, tag string) error
- func (storage *RepoStagesStorage) ExportStage(ctx context.Context, stageDescription *image.StageDescription, ...) error
- func (storage *RepoStagesStorage) FetchImage(ctx context.Context, img container_runtime.LegacyImageInterface) error
- func (storage *RepoStagesStorage) GetAllAndGroupImageMetadataByImageName(ctx context.Context, projectName string, imageNameList []string) (map[string]map[string][]string, map[string]map[string][]string, error)
- func (storage *RepoStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
- func (storage *RepoStagesStorage) GetImportMetadata(ctx context.Context, _, id string) (*ImportMetadata, error)
- func (storage *RepoStagesStorage) GetImportMetadataIDs(ctx context.Context, _ string) ([]string, error)
- func (storage *RepoStagesStorage) GetManagedImages(ctx context.Context, projectName string) ([]string, error)
- func (storage *RepoStagesStorage) GetStageCustomTagMetadata(ctx context.Context, tagOrID string) (*CustomTagMetadata, error)
- func (storage *RepoStagesStorage) GetStageCustomTagMetadataIDs(ctx context.Context) ([]string, error)
- func (storage *RepoStagesStorage) GetStageDescription(ctx context.Context, projectName, digest string, uniqueID int64) (*image.StageDescription, error)
- func (storage *RepoStagesStorage) GetStagesIDs(ctx context.Context, _ string) ([]image.StageID, error)
- func (storage *RepoStagesStorage) GetStagesIDsByDigest(ctx context.Context, _, digest string) ([]image.StageID, error)
- func (storage *RepoStagesStorage) IsImageMetadataExist(ctx context.Context, projectName, imageName, commit, stageID string) (bool, error)
- func (storage *RepoStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
- func (storage *RepoStagesStorage) PutImageMetadata(ctx context.Context, projectName, imageName, commit, stageID string) error
- func (storage *RepoStagesStorage) PutImportMetadata(ctx context.Context, projectName string, metadata *ImportMetadata) error
- func (storage *RepoStagesStorage) RejectStage(ctx context.Context, projectName, digest string, uniqueID int64) error
- func (storage *RepoStagesStorage) RmImageMetadata(ctx context.Context, projectName, imageNameOrID, commit, stageID string) error
- func (storage *RepoStagesStorage) RmImportMetadata(ctx context.Context, _, id string) error
- func (storage *RepoStagesStorage) RmManagedImage(ctx context.Context, projectName, imageName string) error
- func (storage *RepoStagesStorage) ShouldFetchImage(ctx context.Context, img container_runtime.LegacyImageInterface) (bool, error)
- func (storage *RepoStagesStorage) StoreImage(ctx context.Context, img container_runtime.LegacyImageInterface) error
- func (storage *RepoStagesStorage) String() string
- type RepoStagesStorageOptions
- type StagesStorage
- type StagesStorageCache
- type StagesStorageCacheRecord
- type StagesStorageOptions
Constants ¶
View Source
const ( LocalStage_ImageRepoFormat = "%s" LocalStage_ImageFormat = "%s:%s-%d" LocalImportMetadata_ImageNameFormat = "werf-import-metadata/%s" LocalImportMetadata_TagFormat = "%s" LocalClientIDRecord_ImageNameFormat = "werf-client-id/%s" LocalClientIDRecord_ImageFormat = "werf-client-id/%s:%s-%d" )
View Source
const ( RepoStage_ImageFormat = "%s:%s-%d" RepoManagedImageRecord_ImageTagPrefix = "managed-image-" RepoManagedImageRecord_ImageNameFormat = "%s:managed-image-%s" RepoRejectedStageImageRecord_ImageTagSuffix = "-rejected" RepoRejectedStageImageRecord_ImageNameFormat = "%s:%s-%d-rejected" RepoImageMetadataByCommitRecord_ImageTagPrefix = "meta-" RepoImageMetadataByCommitRecord_TagFormat = "meta-%s_%s_%s" RepoCustomTagMetadata_ImageTagPrefix = "custom-tag-meta-" RepoCustomTagMetadata_ImageNameFormat = "%s:custom-tag-meta-%s" RepoImportMetadata_ImageTagPrefix = "import-metadata-" RepoImportMetadata_ImageNameFormat = "%s:import-metadata-%s" RepoClientIDRecord_ImageTagPrefix = "client-id-" RepoClientIDRecord_ImageNameFormat = "%s:client-id-%s-%d" UnexpectedTagFormatErrorPrefix = "unexpected tag format" )
View Source
const ( LocalStorageAddress = ":local" DefaultKubernetesStorageAddress = "kubernetes://werf-synchronization" DefaultHttpSynchronizationServer = "https://synchronization.werf.io" NamelessImageRecordTag = "__nameless__" )
View Source
const ImageDeletionFailedDueToUsedByContainerErrorTip = "Use --force option to remove all containers that are based on deleting werf docker images"
View Source
const (
StagesStorageCacheConfigMapKey = "stagesStorageCache"
)
Variables ¶
View Source
var ErrBadKubernetesSynchronizationAddress = errors.New("bad kubernetes synchronization address")
View Source
var ErrBrokenImage = errors.New("broken image")
Functions ¶
func BrokenImageErr ¶ added in v1.2.13
func IsImageDeletionFailedDueToUsingByContainerErr ¶ added in v1.2.14
Types ¶
type ClientIDRecord ¶ added in v1.1.23
func (*ClientIDRecord) String ¶ added in v1.1.23
func (rec *ClientIDRecord) String() string
type CustomTagMetadata ¶ added in v1.2.28
func (*CustomTagMetadata) ToLabels ¶ added in v1.2.28
func (m *CustomTagMetadata) ToLabels() map[string]string
type DeleteImageOptions ¶
type DeleteImageOptions struct {
RmiForce bool
}
type DockerServerStagesStorage ¶ added in v1.2.26
type DockerServerStagesStorage struct { // Local stages storage is compatible only with docker-server backed runtime DockerServerRuntime *container_runtime.DockerServerRuntime }
func NewDockerServerStagesStorage ¶ added in v1.2.26
func NewDockerServerStagesStorage(dockerServerRuntime *container_runtime.DockerServerRuntime) *DockerServerStagesStorage
func (*DockerServerStagesStorage) AddManagedImage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) AddManagedImage(_ context.Context, _, _ string) error
func (*DockerServerStagesStorage) AddStageCustomTag ¶ added in v1.2.28
func (storage *DockerServerStagesStorage) AddStageCustomTag(_ context.Context, _ *image.StageDescription, _ string) error
func (*DockerServerStagesStorage) Address ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) Address() string
func (*DockerServerStagesStorage) CheckStageCustomTag ¶ added in v1.2.28
func (storage *DockerServerStagesStorage) CheckStageCustomTag(_ context.Context, _ *image.StageDescription, _ string) error
func (*DockerServerStagesStorage) ConstructStageImageName ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) ConstructStageImageName(projectName, digest string, uniqueID int64) string
func (*DockerServerStagesStorage) CreateRepo ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) CreateRepo(_ context.Context) error
func (*DockerServerStagesStorage) DeleteRepo ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) DeleteRepo(_ context.Context) error
func (*DockerServerStagesStorage) DeleteStage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, options DeleteImageOptions) error
func (*DockerServerStagesStorage) DeleteStageCustomTag ¶ added in v1.2.28
func (storage *DockerServerStagesStorage) DeleteStageCustomTag(_ context.Context, _ string) error
func (*DockerServerStagesStorage) ExportStage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) ExportStage(ctx context.Context, stageDescription *image.StageDescription, destinationReference string) error
func (*DockerServerStagesStorage) FetchImage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) FetchImage(_ context.Context, _ container_runtime.LegacyImageInterface) error
func (*DockerServerStagesStorage) FilterStagesAndProcessRelatedData ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) FilterStagesAndProcessRelatedData(ctx context.Context, stageDescriptions []*image.StageDescription, options FilterStagesAndProcessRelatedDataOptions) ([]*image.StageDescription, error)
func (*DockerServerStagesStorage) GetAllAndGroupImageMetadataByImageName ¶ added in v1.2.26
func (*DockerServerStagesStorage) GetClientIDRecords ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
func (*DockerServerStagesStorage) GetImportMetadata ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) GetImportMetadata(ctx context.Context, projectName, id string) (*ImportMetadata, error)
func (*DockerServerStagesStorage) GetImportMetadataIDs ¶ added in v1.2.26
func (*DockerServerStagesStorage) GetManagedImages ¶ added in v1.2.26
func (*DockerServerStagesStorage) GetStageCustomTagMetadata ¶ added in v1.2.28
func (storage *DockerServerStagesStorage) GetStageCustomTagMetadata(_ context.Context, _ string) (*CustomTagMetadata, error)
func (*DockerServerStagesStorage) GetStageCustomTagMetadataIDs ¶ added in v1.2.28
func (storage *DockerServerStagesStorage) GetStageCustomTagMetadataIDs(_ context.Context) ([]string, error)
func (*DockerServerStagesStorage) GetStageDescription ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) GetStageDescription(ctx context.Context, projectName, digest string, uniqueID int64) (*image.StageDescription, error)
func (*DockerServerStagesStorage) GetStagesIDs ¶ added in v1.2.26
func (*DockerServerStagesStorage) GetStagesIDsByDigest ¶ added in v1.2.26
func (*DockerServerStagesStorage) IsImageMetadataExist ¶ added in v1.2.26
func (*DockerServerStagesStorage) PostClientIDRecord ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
func (*DockerServerStagesStorage) PutImageMetadata ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) PutImageMetadata(_ context.Context, _, _, _, _ string) error
func (*DockerServerStagesStorage) PutImportMetadata ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) PutImportMetadata(ctx context.Context, projectName string, metadata *ImportMetadata) error
func (*DockerServerStagesStorage) RejectStage ¶ added in v1.2.26
func (*DockerServerStagesStorage) RmImageMetadata ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) RmImageMetadata(_ context.Context, _, _, _, _ string) error
func (*DockerServerStagesStorage) RmImportMetadata ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) RmImportMetadata(ctx context.Context, projectName, id string) error
func (*DockerServerStagesStorage) RmManagedImage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) RmManagedImage(_ context.Context, _, _ string) error
func (*DockerServerStagesStorage) ShouldFetchImage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) ShouldFetchImage(_ context.Context, _ container_runtime.LegacyImageInterface) (bool, error)
func (*DockerServerStagesStorage) StoreImage ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) StoreImage(ctx context.Context, img container_runtime.LegacyImageInterface) error
func (*DockerServerStagesStorage) String ¶ added in v1.2.26
func (storage *DockerServerStagesStorage) String() string
type FileStagesStorageCache ¶
type FileStagesStorageCache struct {
CacheDir string
}
func NewFileStagesStorageCache ¶
func NewFileStagesStorageCache(cacheDir string) *FileStagesStorageCache
func (*FileStagesStorageCache) DeleteAllStages ¶
func (cache *FileStagesStorageCache) DeleteAllStages(_ context.Context, projectName string) error
func (*FileStagesStorageCache) DeleteStagesByDigest ¶ added in v1.2.0
func (cache *FileStagesStorageCache) DeleteStagesByDigest(ctx context.Context, projectName, digest string) error
func (*FileStagesStorageCache) GetAllStages ¶
func (*FileStagesStorageCache) GetStagesByDigest ¶ added in v1.2.0
func (*FileStagesStorageCache) StoreStagesByDigest ¶ added in v1.2.0
func (*FileStagesStorageCache) String ¶
func (cache *FileStagesStorageCache) String() string
type FilterStagesAndProcessRelatedDataOptions ¶ added in v1.1.23
type GenericLockManager ¶
func NewGenericLockManager ¶
func NewGenericLockManager(locker lockgate.Locker) *GenericLockManager
func (*GenericLockManager) LockStage ¶
func (manager *GenericLockManager) LockStage(ctx context.Context, projectName, digest string) (LockHandle, error)
func (*GenericLockManager) LockStageCache ¶
func (manager *GenericLockManager) LockStageCache(ctx context.Context, projectName, digest string) (LockHandle, error)
func (*GenericLockManager) Unlock ¶
func (manager *GenericLockManager) Unlock(ctx context.Context, lock LockHandle) error
type ImageMetadata ¶
type ImageMetadata struct {
ContentDigest string
}
type ImportMetadata ¶ added in v1.2.0
func (*ImportMetadata) ToLabels ¶ added in v1.2.0
func (m *ImportMetadata) ToLabels() map[string]string
type KubernetesLockManager ¶ added in v1.2.26
type KubernetesLockManager struct { KubeClient kubernetes.Interface KubeDynamicClient dynamic.Interface Namespace string LockerPerProject map[string]lockgate.Locker GetConfigMapNameFunc func(projectName string) string // contains filtered or unexported fields }
func NewKubernetesLockManager ¶
func NewKubernetesLockManager(namespace string, kubeClient kubernetes.Interface, kubeDynamicClient dynamic.Interface, getConfigMapNameFunc func(projectName string) string) *KubernetesLockManager
func (*KubernetesLockManager) LockStage ¶ added in v1.2.26
func (manager *KubernetesLockManager) LockStage(ctx context.Context, projectName, digest string) (LockHandle, error)
func (*KubernetesLockManager) LockStageCache ¶ added in v1.2.26
func (manager *KubernetesLockManager) LockStageCache(ctx context.Context, projectName, digest string) (LockHandle, error)
func (*KubernetesLockManager) Unlock ¶ added in v1.2.26
func (manager *KubernetesLockManager) Unlock(ctx context.Context, lock LockHandle) error
type KubernetesStagesStorageCache ¶
type KubernetesStagesStorageCache struct { KubeClient kubernetes.Interface Namespace string GetConfigMapNameFunc func(projectName string) string }
func NewKubernetesStagesStorageCache ¶
func NewKubernetesStagesStorageCache(namespace string, kubeClient kubernetes.Interface, getConfigMapNameFunc func(projectName string) string) *KubernetesStagesStorageCache
func (*KubernetesStagesStorageCache) DeleteAllStages ¶
func (cache *KubernetesStagesStorageCache) DeleteAllStages(ctx context.Context, projectName string) error
func (*KubernetesStagesStorageCache) DeleteStagesByDigest ¶ added in v1.2.0
func (cache *KubernetesStagesStorageCache) DeleteStagesByDigest(ctx context.Context, projectName, digest string) error
func (*KubernetesStagesStorageCache) GetAllStages ¶
func (*KubernetesStagesStorageCache) GetStagesByDigest ¶ added in v1.2.0
func (*KubernetesStagesStorageCache) StoreStagesByDigest ¶ added in v1.2.0
func (*KubernetesStagesStorageCache) String ¶
func (cache *KubernetesStagesStorageCache) String() string
type KubernetesStagesStorageCacheOptions ¶ added in v1.1.23
type KubernetesSynchronizationParams ¶ added in v1.1.23
type KubernetesSynchronizationParams struct { ConfigContext string ConfigPath string ConfigDataBase64 string ConfigPathMergeList []string Namespace string }
func ParseKubernetesSynchronization ¶ added in v1.1.23
func ParseKubernetesSynchronization(address string) (*KubernetesSynchronizationParams, error)
type LockHandle ¶
type LockHandle struct { ProjectName string `json:"projectName"` LockgateHandle lockgate.LockHandle `json:"lockgateHandle"` }
type LockManager ¶
type LockManager interface { LockStage(ctx context.Context, projectName, digest string) (LockHandle, error) LockStageCache(ctx context.Context, projectName, digest string) (LockHandle, error) Unlock(ctx context.Context, lockHandle LockHandle) error }
type LockStagesAndImagesOptions ¶
type LockStagesAndImagesOptions struct {
GetOrCreateImagesOnly bool `json:"getOrCreateImagesOnly"`
}
type RepoStagesStorage ¶
type RepoStagesStorage struct { RepoAddress string DockerRegistry docker_registry.DockerRegistry ContainerRuntime container_runtime.ContainerRuntime }
func NewRepoStagesStorage ¶
func NewRepoStagesStorage(repoAddress string, containerRuntime container_runtime.ContainerRuntime, options RepoStagesStorageOptions) (*RepoStagesStorage, error)
func (*RepoStagesStorage) AddManagedImage ¶
func (storage *RepoStagesStorage) AddManagedImage(ctx context.Context, projectName, imageName string) error
func (*RepoStagesStorage) AddStageCustomTag ¶ added in v1.2.6
func (storage *RepoStagesStorage) AddStageCustomTag(ctx context.Context, stageDescription *image.StageDescription, tag string) error
func (*RepoStagesStorage) Address ¶
func (storage *RepoStagesStorage) Address() string
func (*RepoStagesStorage) CheckStageCustomTag ¶ added in v1.2.6
func (storage *RepoStagesStorage) CheckStageCustomTag(ctx context.Context, stageDescription *image.StageDescription, tag string) error
func (*RepoStagesStorage) ConstructStageImageName ¶
func (storage *RepoStagesStorage) ConstructStageImageName(_, digest string, uniqueID int64) string
func (*RepoStagesStorage) CreateRepo ¶
func (storage *RepoStagesStorage) CreateRepo(ctx context.Context) error
func (*RepoStagesStorage) DeleteRepo ¶
func (storage *RepoStagesStorage) DeleteRepo(ctx context.Context) error
func (*RepoStagesStorage) DeleteStage ¶ added in v1.1.23
func (storage *RepoStagesStorage) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, _ DeleteImageOptions) error
func (*RepoStagesStorage) DeleteStageCustomTag ¶ added in v1.2.28
func (storage *RepoStagesStorage) DeleteStageCustomTag(ctx context.Context, tag string) error
func (*RepoStagesStorage) ExportStage ¶ added in v1.2.15
func (storage *RepoStagesStorage) ExportStage(ctx context.Context, stageDescription *image.StageDescription, destinationReference string) error
func (*RepoStagesStorage) FetchImage ¶
func (storage *RepoStagesStorage) FetchImage(ctx context.Context, img container_runtime.LegacyImageInterface) error
func (*RepoStagesStorage) GetAllAndGroupImageMetadataByImageName ¶ added in v1.2.0
func (*RepoStagesStorage) GetClientIDRecords ¶ added in v1.1.23
func (storage *RepoStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
func (*RepoStagesStorage) GetImportMetadata ¶ added in v1.2.0
func (storage *RepoStagesStorage) GetImportMetadata(ctx context.Context, _, id string) (*ImportMetadata, error)
func (*RepoStagesStorage) GetImportMetadataIDs ¶ added in v1.2.0
func (*RepoStagesStorage) GetManagedImages ¶
func (*RepoStagesStorage) GetStageCustomTagMetadata ¶ added in v1.2.28
func (storage *RepoStagesStorage) GetStageCustomTagMetadata(ctx context.Context, tagOrID string) (*CustomTagMetadata, error)
func (*RepoStagesStorage) GetStageCustomTagMetadataIDs ¶ added in v1.2.28
func (storage *RepoStagesStorage) GetStageCustomTagMetadataIDs(ctx context.Context) ([]string, error)
func (*RepoStagesStorage) GetStageDescription ¶
func (storage *RepoStagesStorage) GetStageDescription(ctx context.Context, projectName, digest string, uniqueID int64) (*image.StageDescription, error)
func (*RepoStagesStorage) GetStagesIDs ¶ added in v1.1.23
func (*RepoStagesStorage) GetStagesIDsByDigest ¶ added in v1.2.0
func (*RepoStagesStorage) IsImageMetadataExist ¶ added in v1.2.0
func (*RepoStagesStorage) PostClientIDRecord ¶ added in v1.1.23
func (storage *RepoStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
func (*RepoStagesStorage) PutImageMetadata ¶ added in v1.2.0
func (storage *RepoStagesStorage) PutImageMetadata(ctx context.Context, projectName, imageName, commit, stageID string) error
func (*RepoStagesStorage) PutImportMetadata ¶ added in v1.2.0
func (storage *RepoStagesStorage) PutImportMetadata(ctx context.Context, projectName string, metadata *ImportMetadata) error
func (*RepoStagesStorage) RejectStage ¶ added in v1.1.24
func (*RepoStagesStorage) RmImageMetadata ¶ added in v1.2.0
func (storage *RepoStagesStorage) RmImageMetadata(ctx context.Context, projectName, imageNameOrID, commit, stageID string) error
func (*RepoStagesStorage) RmImportMetadata ¶ added in v1.2.0
func (storage *RepoStagesStorage) RmImportMetadata(ctx context.Context, _, id string) error
func (*RepoStagesStorage) RmManagedImage ¶
func (storage *RepoStagesStorage) RmManagedImage(ctx context.Context, projectName, imageName string) error
func (*RepoStagesStorage) ShouldFetchImage ¶
func (storage *RepoStagesStorage) ShouldFetchImage(ctx context.Context, img container_runtime.LegacyImageInterface) (bool, error)
func (*RepoStagesStorage) StoreImage ¶
func (storage *RepoStagesStorage) StoreImage(ctx context.Context, img container_runtime.LegacyImageInterface) error
func (*RepoStagesStorage) String ¶
func (storage *RepoStagesStorage) String() string
type RepoStagesStorageOptions ¶
type RepoStagesStorageOptions struct { docker_registry.DockerRegistryOptions ContainerRegistry string }
type StagesStorage ¶
type StagesStorage interface { GetStagesIDs(ctx context.Context, projectName string) ([]image.StageID, error) GetStagesIDsByDigest(ctx context.Context, projectName, digest string) ([]image.StageID, error) GetStageDescription(ctx context.Context, projectName, digest string, uniqueID int64) (*image.StageDescription, error) ExportStage(ctx context.Context, stageDescription *image.StageDescription, destinationReference string) error DeleteStage(ctx context.Context, stageDescription *image.StageDescription, options DeleteImageOptions) error AddStageCustomTag(ctx context.Context, stageDescription *image.StageDescription, tag string) error CheckStageCustomTag(ctx context.Context, stageDescription *image.StageDescription, tag string) error DeleteStageCustomTag(ctx context.Context, tag string) error GetStageCustomTagMetadataIDs(ctx context.Context) ([]string, error) GetStageCustomTagMetadata(ctx context.Context, tagOrID string) (*CustomTagMetadata, error) RejectStage(ctx context.Context, projectName, digest string, uniqueID int64) error ConstructStageImageName(projectName, digest string, uniqueID int64) string // FetchImage will create a local image in the container-runtime FetchImage(ctx context.Context, img container_runtime.LegacyImageInterface) error // StoreImage will store a local image into the container-runtime, local built image should exist prior running store StoreImage(ctx context.Context, img container_runtime.LegacyImageInterface) error ShouldFetchImage(ctx context.Context, img container_runtime.LegacyImageInterface) (bool, error) CreateRepo(ctx context.Context) error DeleteRepo(ctx context.Context) error AddManagedImage(ctx context.Context, projectName, imageName string) error RmManagedImage(ctx context.Context, projectName, imageName string) error GetManagedImages(ctx context.Context, projectName string) ([]string, error) PutImageMetadata(ctx context.Context, projectName, imageName, commit, stageID string) error RmImageMetadata(ctx context.Context, projectName, imageNameOrID, commit, stageID string) error IsImageMetadataExist(ctx context.Context, projectName, imageName, commit, stageID string) (bool, error) GetAllAndGroupImageMetadataByImageName(ctx context.Context, projectName string, imageNameList []string) (map[string]map[string][]string, map[string]map[string][]string, error) GetImportMetadata(ctx context.Context, projectName, id string) (*ImportMetadata, error) PutImportMetadata(ctx context.Context, projectName string, metadata *ImportMetadata) error RmImportMetadata(ctx context.Context, projectName, id string) error GetImportMetadataIDs(ctx context.Context, projectName string) ([]string, error) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error String() string Address() string }
func NewStagesStorage ¶
func NewStagesStorage(stagesStorageAddress string, containerRuntime container_runtime.ContainerRuntime, options StagesStorageOptions) (StagesStorage, error)
type StagesStorageCache ¶
type StagesStorageCache interface { GetAllStages(ctx context.Context, projectName string) (bool, []image.StageID, error) DeleteAllStages(ctx context.Context, projectName string) error GetStagesByDigest(ctx context.Context, projectName, digest string) (bool, []image.StageID, error) StoreStagesByDigest(ctx context.Context, projectName, digest string, stages []image.StageID) error DeleteStagesByDigest(ctx context.Context, projectName, digest string) error String() string }
type StagesStorageOptions ¶
type StagesStorageOptions struct {
RepoStagesStorageOptions
}
Source Files ¶
- custom_tag_metadata.go
- delete_image_options.go
- docker_server_stages_storage.go
- file_stages_storage_cache.go
- generic_lock_manager.go
- import_metadata.go
- kubernetes_lock_manager.go
- kubernetes_stages_storage_cache.go
- lock_manager.go
- repo_stages_storage.go
- stages_storage.go
- stages_storage_cache.go
- synchronization.go
Click to show internal directories.
Click to hide internal directories.