stages_storage

package
v1.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetImageInspect(imageName string) (*ImageInspect, error)
	SetImageInspect(imageName string, inspect *ImageInspect) error
}

type FileLockManager

type FileLockManager struct {
	// contains filtered or unexported fields
}

func (*FileLockManager) LockAllImagesReadOnly

func (lockManager *FileLockManager) LockAllImagesReadOnly(projectName string) error

func (*FileLockManager) LockStage

func (lockManager *FileLockManager) LockStage(projectName, signature string) error

func (*FileLockManager) ReleaseAllStageLocks

func (lockManager *FileLockManager) ReleaseAllStageLocks() error

func (*FileLockManager) UnlockAllImages

func (lockManager *FileLockManager) UnlockAllImages(projectName string) error

func (*FileLockManager) UnlockStage

func (lockManager *FileLockManager) UnlockStage(projectName, signature string) error

type ImageInfo

type ImageInfo struct {
	Signature string
	ImageName string
	Labels    map[string]string
	CreatedAt time.Time
}

type ImageInspect

type ImageInspect struct{}

type LocalStagesStorage

type LocalStagesStorage struct{}

func (*LocalStagesStorage) GetImagesBySignature

func (storage *LocalStagesStorage) GetImagesBySignature(projectName, signature string) ([]*ImageInfo, error)

func (*LocalStagesStorage) StoreStageImage

func (storage *LocalStagesStorage) StoreStageImage(stageImage image.ImageInterface) error

func (*LocalStagesStorage) String

func (storage *LocalStagesStorage) String() string

func (*LocalStagesStorage) SyncStageImage

func (storage *LocalStagesStorage) SyncStageImage(stageImage image.ImageInterface) error

type LockManager

type LockManager interface {
	LockStage(projectName, signature string) error
	//TryLockStage(projectName ,signature string) (bool, error)
	UnlockStage(projectName, signature string) error
	ReleaseAllStageLocks() error
	LockAllImagesReadOnly(projectName string) error
	UnlockAllImages(projectName string) error
}

type MemoryCache

type MemoryCache struct {
	ImagesInspects map[string]*ImageInspect
}

func NewMemoryCache

func NewMemoryCache() *MemoryCache

func (*MemoryCache) GetImageInspect

func (cache *MemoryCache) GetImageInspect(imageName string) (*ImageInspect, error)

func (*MemoryCache) SetImageInspect

func (cache *MemoryCache) SetImageInspect(imageName string, inspect *ImageInspect) error

type StagesStorage

type StagesStorage interface {
	// TODO cleanup GetAllImages() ([]StageImage, error)
	GetImagesBySignature(projectName, signature string) ([]*ImageInfo, error)

	// в том числе docker pull из registry + image.SyncDockerState
	// lock по имени image чтобы не делать 2 раза pull одновременно
	SyncStageImage(stageImage image.ImageInterface) error
	StoreStageImage(stageImage image.ImageInterface) error

	String() string
}

Jump to

Keyboard shortcuts

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