Documentation ¶
Index ¶
- Constants
- Variables
- func IsImageDeletionFailedDueToUsingByContainerError(err error) bool
- func IsTagNotAssociatedWithImageError(err error) bool
- type ClientIDRecord
- type DeleteImageOptions
- type DockerImagesRepo
- func (repo *DockerImagesRepo) CreateImageRepo(ctx context.Context, imageName string) error
- func (repo *DockerImagesRepo) DeleteImageRepo(ctx context.Context, imageName string) error
- func (repo *DockerImagesRepo) DeleteRepoImage(ctx context.Context, repoImage *image.Info) error
- func (repo *DockerImagesRepo) GetAllImageRepoTags(ctx context.Context, imageName string) ([]string, error)
- func (repo *DockerImagesRepo) GetRepoImage(ctx context.Context, imageName, tag string) (*image.Info, error)
- func (m DockerImagesRepo) ImageRepo(imageName string) string
- func (m DockerImagesRepo) ImageRepoMetaTag(imageName, tag string) string
- func (m DockerImagesRepo) ImageRepoTag(imageName, tag string) string
- func (m DockerImagesRepo) ImageRepoWithTag(imageName, tag string) string
- func (repo *DockerImagesRepo) ImageRepositoryMetaTag(imageName, tag string) string
- func (repo *DockerImagesRepo) ImageRepositoryName(imageName string) string
- func (repo *DockerImagesRepo) ImageRepositoryNameWithTag(imageName, metaTag string) string
- func (repo *DockerImagesRepo) ImageRepositoryTag(imageName, metaTag string) string
- func (m DockerImagesRepo) ImagesRepo() string
- func (repo *DockerImagesRepo) IsImageRepositoryTag(imageName, tag string) bool
- func (m DockerImagesRepo) IsMonorepo() bool
- func (repo *DockerImagesRepo) IsRepoImage(imageName string, repoImage *image.Info) bool
- func (repo *DockerImagesRepo) PublishImage(ctx context.Context, publishImage *container_runtime.WerfImage) error
- func (repo *DockerImagesRepo) String() string
- type DockerImagesRepoOptions
- type FileStagesStorageCache
- func (cache *FileStagesStorageCache) DeleteAllStages(_ context.Context, projectName string) error
- func (cache *FileStagesStorageCache) DeleteStagesBySignature(ctx context.Context, projectName, signature string) error
- func (cache *FileStagesStorageCache) GetAllStages(ctx context.Context, projectName string) (bool, []image.StageID, error)
- func (cache *FileStagesStorageCache) GetStagesBySignature(ctx context.Context, projectName, signature string) (bool, []image.StageID, error)
- func (cache *FileStagesStorageCache) StoreStagesBySignature(ctx context.Context, projectName, signature string, stages []image.StageID) error
- func (cache *FileStagesStorageCache) String() string
- type FilterStagesAndProcessRelatedDataOptions
- type GenericLockManager
- func (manager *GenericLockManager) LockImage(ctx context.Context, projectName, imageName string) (LockHandle, error)
- func (manager *GenericLockManager) LockStage(ctx context.Context, projectName, signature string) (LockHandle, error)
- func (manager *GenericLockManager) LockStageCache(ctx context.Context, projectName, signature string) (LockHandle, error)
- func (manager *GenericLockManager) Unlock(ctx context.Context, lock LockHandle) error
- type ImageMetadata
- type ImageMetadataCache
- type ImageMetadataCacheRecord
- type ImagesRepo
- type ImagesRepoOptions
- type KubernetesStagesStorageCache
- func (cache *KubernetesStagesStorageCache) DeleteAllStages(ctx context.Context, projectName string) error
- func (cache *KubernetesStagesStorageCache) DeleteStagesBySignature(ctx context.Context, projectName, signature string) error
- func (cache *KubernetesStagesStorageCache) GetAllStages(ctx context.Context, projectName string) (bool, []image.StageID, error)
- func (cache *KubernetesStagesStorageCache) GetStagesBySignature(ctx context.Context, projectName, signature string) (bool, []image.StageID, error)
- func (cache *KubernetesStagesStorageCache) StoreStagesBySignature(ctx context.Context, projectName, signature string, stages []image.StageID) error
- func (cache *KubernetesStagesStorageCache) String() string
- type KubernetesStagesStorageCacheData
- type KubernetesStagesStorageCacheOptions
- type KubernetesSynchronizationParams
- type KuberntesLockManager
- func (manager *KuberntesLockManager) LockImage(ctx context.Context, projectName, imageName string) (LockHandle, error)
- func (manager *KuberntesLockManager) LockStage(ctx context.Context, projectName, signature string) (LockHandle, error)
- func (manager *KuberntesLockManager) LockStageCache(ctx context.Context, projectName, signature string) (LockHandle, error)
- func (manager *KuberntesLockManager) Unlock(ctx context.Context, lock LockHandle) error
- type LocalDockerServerStagesStorage
- func (storage *LocalDockerServerStagesStorage) AddManagedImage(ctx context.Context, projectName, imageName string) error
- func (storage *LocalDockerServerStagesStorage) Address() string
- func (storage *LocalDockerServerStagesStorage) ConstructStageImageName(projectName, signature string, uniqueID int64) string
- func (storage *LocalDockerServerStagesStorage) CreateRepo(_ context.Context) error
- func (storage *LocalDockerServerStagesStorage) DeleteRepo(_ context.Context) error
- func (storage *LocalDockerServerStagesStorage) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, ...) error
- func (storage *LocalDockerServerStagesStorage) FetchImage(_ context.Context, _ container_runtime.Image) error
- func (storage *LocalDockerServerStagesStorage) FilterStagesAndProcessRelatedData(ctx context.Context, stageDescriptions []*image.StageDescription, ...) ([]*image.StageDescription, error)
- func (storage *LocalDockerServerStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
- func (storage *LocalDockerServerStagesStorage) GetImageCommits(ctx context.Context, projectName, imageName string) ([]string, error)
- func (storage *LocalDockerServerStagesStorage) GetImageMetadataByCommit(ctx context.Context, projectName, imageName, commit string) (*ImageMetadata, error)
- func (storage *LocalDockerServerStagesStorage) GetManagedImages(ctx context.Context, projectName string) ([]string, error)
- func (storage *LocalDockerServerStagesStorage) GetStageDescription(ctx context.Context, projectName, signature string, uniqueID int64) (*image.StageDescription, error)
- func (storage *LocalDockerServerStagesStorage) GetStagesIDs(ctx context.Context, projectName string) ([]image.StageID, error)
- func (storage *LocalDockerServerStagesStorage) GetStagesIDsBySignature(ctx context.Context, projectName, signature string) ([]image.StageID, error)
- func (storage *LocalDockerServerStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
- func (storage *LocalDockerServerStagesStorage) PutImageCommit(ctx context.Context, projectName, imageName, commit string, ...) error
- func (storage *LocalDockerServerStagesStorage) RejectStage(ctx context.Context, projectName, digest string, uniqueID int64) error
- func (storage *LocalDockerServerStagesStorage) RmImageCommit(ctx context.Context, projectName, imageName, commit string) error
- func (storage *LocalDockerServerStagesStorage) RmManagedImage(ctx context.Context, projectName, imageName string) error
- func (storage *LocalDockerServerStagesStorage) ShouldFetchImage(_ context.Context, _ container_runtime.Image) (bool, error)
- func (storage *LocalDockerServerStagesStorage) StoreImage(ctx context.Context, img container_runtime.Image) error
- func (storage *LocalDockerServerStagesStorage) String() string
- type LockHandle
- type LockManager
- type RepoStagesStorage
- func (storage *RepoStagesStorage) AddManagedImage(ctx context.Context, projectName, imageName string) error
- func (storage *RepoStagesStorage) Address() string
- func (storage *RepoStagesStorage) ConstructStageImageName(_, signature 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) FetchImage(ctx context.Context, img container_runtime.Image) error
- func (storage *RepoStagesStorage) FilterStagesAndProcessRelatedData(_ context.Context, stageDescriptions []*image.StageDescription, ...) ([]*image.StageDescription, error)
- func (storage *RepoStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
- func (storage *RepoStagesStorage) GetImageCommits(ctx context.Context, projectName, imageName string) ([]string, error)
- func (storage *RepoStagesStorage) GetImageMetadataByCommit(ctx context.Context, projectName, imageName, commit string) (*ImageMetadata, error)
- func (storage *RepoStagesStorage) GetManagedImages(ctx context.Context, projectName string) ([]string, error)
- func (storage *RepoStagesStorage) GetStageDescription(ctx context.Context, projectName, signature string, uniqueID int64) (*image.StageDescription, error)
- func (storage *RepoStagesStorage) GetStagesIDs(ctx context.Context, projectName string) ([]image.StageID, error)
- func (storage *RepoStagesStorage) GetStagesIDsBySignature(ctx context.Context, projectName, signature string) ([]image.StageID, error)
- func (storage *RepoStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
- func (storage *RepoStagesStorage) PutImageCommit(ctx context.Context, projectName, imageName, commit string, ...) error
- func (storage *RepoStagesStorage) RejectStage(ctx context.Context, projectName, digest string, uniqueID int64) error
- func (storage *RepoStagesStorage) RmImageCommit(ctx context.Context, projectName, imageName, commit string) error
- func (storage *RepoStagesStorage) RmManagedImage(ctx context.Context, projectName, imageName string) error
- func (storage *RepoStagesStorage) ShouldFetchImage(ctx context.Context, img container_runtime.Image) (bool, error)
- func (storage *RepoStagesStorage) StoreImage(ctx context.Context, img container_runtime.Image) error
- func (storage *RepoStagesStorage) String() string
- type RepoStagesStorageOptions
- type StagesStorage
- type StagesStorageCache
- type StagesStorageCacheRecord
- type StagesStorageOptions
Constants ¶
View Source
const ( LocalStage_ImageRepoPrefix = "werf-stages-storage/" LocalStage_ImageRepoFormat = "werf-stages-storage/%s" LocalStage_ImageFormat = "werf-stages-storage/%s:%s-%d" LocalManagedImageRecord_ImageNameFormat = "werf-managed-images/%s" LocalManagedImageRecord_ImageFormat = "werf-managed-images/%s:%s" LocalImageMetadataByCommitRecord_ImageNameFormat = "werf-images-metadata-by-commit/%s" LocalImageMetadataByCommitRecord_TagFormat = "%s-%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 = "image-metadata-by-commit-" RepoImageMetadataByCommitRecord_TagFormat = "image-metadata-by-commit-%s-%s" RepoClientIDRecrod_ImageTagPrefix = "client-id-" RepoClientIDRecrod_ImageNameFormat = "%s:client-id-%s-%d" UnexpectedTagFormatErrorPrefix = "unexpected tag format" )
View Source
const ( LocalStorageAddress = ":local" DefaultKubernetesStorageAddress = "kubernetes://werf-synchronization" NamelessImageRecordTag = "__nameless__" )
View Source
const ImageDeletionFailedDueToUsedByContainerErrorTip = "Use --force option to remove all containers that are based on deleting werf docker images"
View Source
const (
ImageMetadataCacheVersion = "1"
)
View Source
const (
StagesStorageCacheConfigMapKey = "stagesStorageCache"
)
Variables ¶
View Source
var (
ErrBadKubernetesSyncrhonizationAddress = errors.New("bad kubernetes synchronization address")
)
View Source
var (
ErrBrokenImage = errors.New("broken image")
)
Functions ¶
func IsImageDeletionFailedDueToUsingByContainerError ¶ added in v1.1.23
func IsTagNotAssociatedWithImageError ¶ added in v1.1.23
Types ¶
type ClientIDRecord ¶ added in v1.1.23
func (*ClientIDRecord) String ¶ added in v1.1.23
func (rec *ClientIDRecord) String() string
type DeleteImageOptions ¶
type DeleteImageOptions struct {
RmiForce bool
}
type DockerImagesRepo ¶
type DockerImagesRepo struct { docker_registry.DockerRegistry // contains filtered or unexported fields }
func (*DockerImagesRepo) CreateImageRepo ¶
func (repo *DockerImagesRepo) CreateImageRepo(ctx context.Context, imageName string) error
func (*DockerImagesRepo) DeleteImageRepo ¶
func (repo *DockerImagesRepo) DeleteImageRepo(ctx context.Context, imageName string) error
func (*DockerImagesRepo) DeleteRepoImage ¶
func (*DockerImagesRepo) GetAllImageRepoTags ¶
func (*DockerImagesRepo) GetRepoImage ¶
func (DockerImagesRepo) ImageRepoMetaTag ¶ added in v1.1.23
func (DockerImagesRepo) ImageRepoTag ¶
func (DockerImagesRepo) ImageRepoWithTag ¶
func (*DockerImagesRepo) ImageRepositoryMetaTag ¶ added in v1.1.23
func (repo *DockerImagesRepo) ImageRepositoryMetaTag(imageName, tag string) string
func (*DockerImagesRepo) ImageRepositoryName ¶
func (repo *DockerImagesRepo) ImageRepositoryName(imageName string) string
func (*DockerImagesRepo) ImageRepositoryNameWithTag ¶
func (repo *DockerImagesRepo) ImageRepositoryNameWithTag(imageName, metaTag string) string
func (*DockerImagesRepo) ImageRepositoryTag ¶
func (repo *DockerImagesRepo) ImageRepositoryTag(imageName, metaTag string) string
func (DockerImagesRepo) ImagesRepo ¶
func (m DockerImagesRepo) ImagesRepo() string
func (*DockerImagesRepo) IsImageRepositoryTag ¶ added in v1.1.23
func (repo *DockerImagesRepo) IsImageRepositoryTag(imageName, tag string) bool
func (DockerImagesRepo) IsMonorepo ¶
func (m DockerImagesRepo) IsMonorepo() bool
func (*DockerImagesRepo) IsRepoImage ¶ added in v1.1.23
func (repo *DockerImagesRepo) IsRepoImage(imageName string, repoImage *image.Info) bool
func (*DockerImagesRepo) PublishImage ¶
func (repo *DockerImagesRepo) PublishImage(ctx context.Context, publishImage *container_runtime.WerfImage) error
FIXME: use docker-registry object
func (*DockerImagesRepo) String ¶
func (repo *DockerImagesRepo) String() string
type DockerImagesRepoOptions ¶
type DockerImagesRepoOptions struct { docker_registry.DockerRegistryOptions Implementation 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) DeleteStagesBySignature ¶
func (cache *FileStagesStorageCache) DeleteStagesBySignature(ctx context.Context, projectName, signature string) error
func (*FileStagesStorageCache) GetAllStages ¶
func (*FileStagesStorageCache) GetStagesBySignature ¶
func (*FileStagesStorageCache) StoreStagesBySignature ¶
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) LockImage ¶
func (manager *GenericLockManager) LockImage(ctx context.Context, projectName, imageName string) (LockHandle, error)
func (*GenericLockManager) LockStage ¶
func (manager *GenericLockManager) LockStage(ctx context.Context, projectName, signature string) (LockHandle, error)
func (*GenericLockManager) LockStageCache ¶
func (manager *GenericLockManager) LockStageCache(ctx context.Context, projectName, signature string) (LockHandle, error)
func (*GenericLockManager) Unlock ¶
func (manager *GenericLockManager) Unlock(ctx context.Context, lock LockHandle) error
type ImageMetadata ¶
type ImageMetadata struct {
ContentSignature string
}
type ImageMetadataCache ¶ added in v1.1.23
type ImageMetadataCache struct {
CacheDir string
}
func GetImageMetadataCache ¶ added in v1.1.23
func GetImageMetadataCache() *ImageMetadataCache
func (*ImageMetadataCache) GetImageMetadata ¶ added in v1.1.23
func (cache *ImageMetadataCache) GetImageMetadata(ctx context.Context, storageName, imageName, commit string) (*ImageMetadata, error)
func (*ImageMetadataCache) StoreImageMetadata ¶ added in v1.1.23
func (cache *ImageMetadataCache) StoreImageMetadata(ctx context.Context, storageName, imageName, commit string, imageMetadata *ImageMetadata) error
type ImageMetadataCacheRecord ¶ added in v1.1.23
type ImageMetadataCacheRecord struct { AccessTimestamp int64 ImageMetadata *ImageMetadata }
type ImagesRepo ¶
type ImagesRepo interface { GetAllImageRepoTags(ctx context.Context, imageName string) ([]string, error) GetRepoImage(ctx context.Context, imageName, tag string) (*image.Info, error) DeleteRepoImage(ctx context.Context, repoImage *image.Info) error IsRepoImage(imageName string, repoImage *image.Info) bool PublishImage(ctx context.Context, publishImage *container_runtime.WerfImage) error CreateImageRepo(ctx context.Context, imageName string) error DeleteImageRepo(ctx context.Context, imageName string) error ImageRepositoryName(imageName string) string ImageRepositoryNameWithTag(imageName, metaTag string) string ImageRepositoryTag(imageName, metaTag string) string ImageRepositoryMetaTag(imageName, tag string) string IsImageRepositoryTag(imageName, tag string) bool String() string }
func NewDockerImagesRepo ¶
func NewDockerImagesRepo(ctx context.Context, projectName, imagesRepoAddress, imagesRepoMode string, options DockerImagesRepoOptions) (ImagesRepo, error)
func NewImagesRepo ¶
func NewImagesRepo(ctx context.Context, projectName, imagesRepoAddress, imagesRepoMode string, options ImagesRepoOptions) (ImagesRepo, error)
type ImagesRepoOptions ¶
type ImagesRepoOptions struct {
DockerImagesRepoOptions
}
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) DeleteStagesBySignature ¶
func (cache *KubernetesStagesStorageCache) DeleteStagesBySignature(ctx context.Context, projectName, signature string) error
func (*KubernetesStagesStorageCache) GetAllStages ¶
func (*KubernetesStagesStorageCache) GetStagesBySignature ¶
func (*KubernetesStagesStorageCache) StoreStagesBySignature ¶
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 { ConfigDataBase64 string ConfigPath string ConfigContext string Namespace string }
func ParseKubernetesSynchronization ¶ added in v1.1.23
func ParseKubernetesSynchronization(address string) (*KubernetesSynchronizationParams, error)
type KuberntesLockManager ¶
type KuberntesLockManager 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) *KuberntesLockManager
func (*KuberntesLockManager) LockImage ¶
func (manager *KuberntesLockManager) LockImage(ctx context.Context, projectName, imageName string) (LockHandle, error)
func (*KuberntesLockManager) LockStage ¶
func (manager *KuberntesLockManager) LockStage(ctx context.Context, projectName, signature string) (LockHandle, error)
func (*KuberntesLockManager) LockStageCache ¶
func (manager *KuberntesLockManager) LockStageCache(ctx context.Context, projectName, signature string) (LockHandle, error)
func (*KuberntesLockManager) Unlock ¶
func (manager *KuberntesLockManager) Unlock(ctx context.Context, lock LockHandle) error
type LocalDockerServerStagesStorage ¶
type LocalDockerServerStagesStorage struct { // Local stages storage is compatible only with docker-server backed runtime LocalDockerServerRuntime *container_runtime.LocalDockerServerRuntime }
func NewLocalDockerServerStagesStorage ¶
func NewLocalDockerServerStagesStorage(localDockerServerRuntime *container_runtime.LocalDockerServerRuntime) *LocalDockerServerStagesStorage
func (*LocalDockerServerStagesStorage) AddManagedImage ¶
func (storage *LocalDockerServerStagesStorage) AddManagedImage(ctx context.Context, projectName, imageName string) error
func (*LocalDockerServerStagesStorage) Address ¶
func (storage *LocalDockerServerStagesStorage) Address() string
func (*LocalDockerServerStagesStorage) ConstructStageImageName ¶
func (storage *LocalDockerServerStagesStorage) ConstructStageImageName(projectName, signature string, uniqueID int64) string
func (*LocalDockerServerStagesStorage) CreateRepo ¶
func (storage *LocalDockerServerStagesStorage) CreateRepo(_ context.Context) error
func (*LocalDockerServerStagesStorage) DeleteRepo ¶
func (storage *LocalDockerServerStagesStorage) DeleteRepo(_ context.Context) error
func (*LocalDockerServerStagesStorage) DeleteStage ¶ added in v1.1.23
func (storage *LocalDockerServerStagesStorage) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, options DeleteImageOptions) error
func (*LocalDockerServerStagesStorage) FetchImage ¶
func (storage *LocalDockerServerStagesStorage) FetchImage(_ context.Context, _ container_runtime.Image) error
func (*LocalDockerServerStagesStorage) FilterStagesAndProcessRelatedData ¶ added in v1.1.23
func (storage *LocalDockerServerStagesStorage) FilterStagesAndProcessRelatedData(ctx context.Context, stageDescriptions []*image.StageDescription, options FilterStagesAndProcessRelatedDataOptions) ([]*image.StageDescription, error)
func (*LocalDockerServerStagesStorage) GetClientIDRecords ¶ added in v1.1.23
func (storage *LocalDockerServerStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
func (*LocalDockerServerStagesStorage) GetImageCommits ¶
func (*LocalDockerServerStagesStorage) GetImageMetadataByCommit ¶
func (storage *LocalDockerServerStagesStorage) GetImageMetadataByCommit(ctx context.Context, projectName, imageName, commit string) (*ImageMetadata, error)
func (*LocalDockerServerStagesStorage) GetManagedImages ¶
func (*LocalDockerServerStagesStorage) GetStageDescription ¶
func (storage *LocalDockerServerStagesStorage) GetStageDescription(ctx context.Context, projectName, signature string, uniqueID int64) (*image.StageDescription, error)
func (*LocalDockerServerStagesStorage) GetStagesIDs ¶ added in v1.1.23
func (*LocalDockerServerStagesStorage) GetStagesIDsBySignature ¶ added in v1.1.23
func (*LocalDockerServerStagesStorage) PostClientIDRecord ¶ added in v1.1.23
func (storage *LocalDockerServerStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
func (*LocalDockerServerStagesStorage) PutImageCommit ¶
func (storage *LocalDockerServerStagesStorage) PutImageCommit(ctx context.Context, projectName, imageName, commit string, metadata *ImageMetadata) error
func (*LocalDockerServerStagesStorage) RejectStage ¶ added in v1.1.24
func (*LocalDockerServerStagesStorage) RmImageCommit ¶
func (storage *LocalDockerServerStagesStorage) RmImageCommit(ctx context.Context, projectName, imageName, commit string) error
func (*LocalDockerServerStagesStorage) RmManagedImage ¶
func (storage *LocalDockerServerStagesStorage) RmManagedImage(ctx context.Context, projectName, imageName string) error
func (*LocalDockerServerStagesStorage) ShouldFetchImage ¶
func (storage *LocalDockerServerStagesStorage) ShouldFetchImage(_ context.Context, _ container_runtime.Image) (bool, error)
func (*LocalDockerServerStagesStorage) StoreImage ¶
func (storage *LocalDockerServerStagesStorage) StoreImage(ctx context.Context, img container_runtime.Image) error
func (*LocalDockerServerStagesStorage) String ¶
func (storage *LocalDockerServerStagesStorage) String() string
type LockHandle ¶
type LockHandle struct { ProjectName string `json:"projectName"` LockgateHandle lockgate.LockHandle `json:"lockgateHandle"` }
type LockManager ¶
type LockManager interface { LockStage(ctx context.Context, projectName, signature string) (LockHandle, error) LockStageCache(ctx context.Context, projectName, signature string) (LockHandle, error) LockImage(ctx context.Context, projectName, imageName string) (LockHandle, error) Unlock(ctx context.Context, lockHandle LockHandle) error }
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) Address ¶
func (storage *RepoStagesStorage) Address() string
func (*RepoStagesStorage) ConstructStageImageName ¶
func (storage *RepoStagesStorage) ConstructStageImageName(_, signature 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) FetchImage ¶
func (storage *RepoStagesStorage) FetchImage(ctx context.Context, img container_runtime.Image) error
func (*RepoStagesStorage) FilterStagesAndProcessRelatedData ¶ added in v1.1.23
func (storage *RepoStagesStorage) FilterStagesAndProcessRelatedData(_ context.Context, stageDescriptions []*image.StageDescription, _ FilterStagesAndProcessRelatedDataOptions) ([]*image.StageDescription, error)
func (*RepoStagesStorage) GetClientIDRecords ¶ added in v1.1.23
func (storage *RepoStagesStorage) GetClientIDRecords(ctx context.Context, projectName string) ([]*ClientIDRecord, error)
func (*RepoStagesStorage) GetImageCommits ¶
func (*RepoStagesStorage) GetImageMetadataByCommit ¶
func (storage *RepoStagesStorage) GetImageMetadataByCommit(ctx context.Context, projectName, imageName, commit string) (*ImageMetadata, error)
func (*RepoStagesStorage) GetManagedImages ¶
func (*RepoStagesStorage) GetStageDescription ¶
func (storage *RepoStagesStorage) GetStageDescription(ctx context.Context, projectName, signature string, uniqueID int64) (*image.StageDescription, error)
func (*RepoStagesStorage) GetStagesIDs ¶ added in v1.1.23
func (*RepoStagesStorage) GetStagesIDsBySignature ¶ added in v1.1.23
func (*RepoStagesStorage) PostClientIDRecord ¶ added in v1.1.23
func (storage *RepoStagesStorage) PostClientIDRecord(ctx context.Context, projectName string, rec *ClientIDRecord) error
func (*RepoStagesStorage) PutImageCommit ¶
func (storage *RepoStagesStorage) PutImageCommit(ctx context.Context, projectName, imageName, commit string, metadata *ImageMetadata) error
func (*RepoStagesStorage) RejectStage ¶ added in v1.1.24
func (*RepoStagesStorage) RmImageCommit ¶
func (storage *RepoStagesStorage) RmImageCommit(ctx context.Context, projectName, imageName, commit 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.Image) (bool, error)
func (*RepoStagesStorage) StoreImage ¶
func (storage *RepoStagesStorage) StoreImage(ctx context.Context, img container_runtime.Image) error
func (*RepoStagesStorage) String ¶
func (storage *RepoStagesStorage) String() string
type RepoStagesStorageOptions ¶
type RepoStagesStorageOptions struct { docker_registry.DockerRegistryOptions Implementation string }
type StagesStorage ¶
type StagesStorage interface { GetStagesIDs(ctx context.Context, projectName string) ([]image.StageID, error) GetStagesIDsBySignature(ctx context.Context, projectName, signature string) ([]image.StageID, error) GetStageDescription(ctx context.Context, projectName, signature string, uniqueID int64) (*image.StageDescription, error) DeleteStage(ctx context.Context, stageDescription *image.StageDescription, options DeleteImageOptions) error FilterStagesAndProcessRelatedData(ctx context.Context, stageDescriptions []*image.StageDescription, options FilterStagesAndProcessRelatedDataOptions) ([]*image.StageDescription, error) RejectStage(ctx context.Context, projectName, signature string, uniqueID int64) error ConstructStageImageName(projectName, signature string, uniqueID int64) string // FetchImage will create a local image in the container-runtime FetchImage(ctx context.Context, img container_runtime.Image) 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.Image) error ShouldFetchImage(ctx context.Context, img container_runtime.Image) (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) PutImageCommit(ctx context.Context, projectName, imageName, commit string, metadata *ImageMetadata) error RmImageCommit(ctx context.Context, projectName, imageName, commit string) error GetImageCommits(ctx context.Context, projectName, imageName string) ([]string, error) GetImageMetadataByCommit(ctx context.Context, projectName, imageName, commit string) (*ImageMetadata, 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 GetStagesBySignature(ctx context.Context, projectName, signature string) (bool, []image.StageID, error) StoreStagesBySignature(ctx context.Context, projectName, signature string, stages []image.StageID) error DeleteStagesBySignature(ctx context.Context, projectName, signature string) error String() string }
type StagesStorageOptions ¶
type StagesStorageOptions struct {
RepoStagesStorageOptions
}
Source Files ¶
- delete_image_options.go
- docker_images_repo.go
- file_stages_storage_cache.go
- generic_lock_manager.go
- image_metadata_cache.go
- images_repo.go
- images_repo_manager.go
- kubernetes_lock_manager.go
- kubernetes_stages_storage_cache.go
- local_docker_server_stages_storage.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.