Documentation
¶
Index ¶
- type Storage
- func (s *Storage) CreateArtifact(artifactID artifact.ID, trashTime time.Time) (path string, commit, abort func() error, err error)
- func (s *Storage) DownloadArtifact(ctx context.Context, endpoint string, artifactID artifact.ID, ...) error
- func (s *Storage) GetArtifact(artifactID artifact.ID) (path string, unlock func(), err error)
- func (s *Storage) GetArtifactMeta(artifactID artifact.ID) (meta models.Meta, err error)
- func (s *Storage) RemoveArtifact(artifactID artifact.ID) (err error)
- func (s *Storage) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) CreateArtifact ¶
func (s *Storage) CreateArtifact( artifactID artifact.ID, trashTime time.Time, ) (path string, commit, abort func() error, err error)
CreateArtifact Создаёт артефакт с указанным ID Артефакт создаётся во временной директории; path - абсолютный путь временной директории При вызове функции commit() он перемещается в storage При вызове функции abort() он удаляется
func (*Storage) DownloadArtifact ¶
func (s *Storage) DownloadArtifact( ctx context.Context, endpoint string, artifactID artifact.ID, trashTime time.Time, ) error
DownloadArtifact Скачивает артефакт ID с указанного endpoint
func (*Storage) GetArtifact ¶
GetArtifact Возвращает абсолютный путь артефакта Артефакт блокируется в режиме на чтение. Для разблокировки необходимо вызвать unlock()
func (*Storage) GetArtifactMeta ¶
GetArtifactMeta Возвращает метаинформацию об артефакте
func (*Storage) RemoveArtifact ¶
RemoveArtifact Удаляет артефакт
Click to show internal directories.
Click to hide internal directories.