Documentation ¶
Index ¶
- Constants
- func RemovePathWithEmptyParentDirsInsideScope(scopeDir, path string) error
- func RunGC(ctx context.Context, ...) error
- func ShouldRunAutoGC(ctx context.Context, allowedVolumeUsagePercentage float64) (bool, error)
- type ArchiveMetadata
- type GitArchiveDesc
- type GitDataEntry
- type GitDataLruSort
- type GitDataManager
- func (manager *GitDataManager) CreateArchiveFile(ctx context.Context, repoID string, opts git_repo.ArchiveOptions, ...) (*git_repo.ArchiveFile, error)
- func (manager *GitDataManager) CreatePatchFile(ctx context.Context, repoID string, opts git_repo.PatchOptions, tmpPath string, ...) (*git_repo.PatchFile, error)
- func (manager *GitDataManager) GetArchiveFile(ctx context.Context, repoID string, opts git_repo.ArchiveOptions) (*git_repo.ArchiveFile, error)
- func (manager *GitDataManager) GetArchivesCacheDir() string
- func (manager *GitDataManager) GetPatchFile(ctx context.Context, repoID string, opts git_repo.PatchOptions) (*git_repo.PatchFile, error)
- func (manager *GitDataManager) GetPatchesCacheDir() string
- func (manager *GitDataManager) LockGC(ctx context.Context, shared bool) (lockgate.LockHandle, error)
- func (manager *GitDataManager) NewTmpFile() (string, error)
- type GitPatchDesc
- type GitRepoDesc
- type GitWorktreeDesc
- type PatchMetadata
Constants ¶
View Source
const ( KeepGitWorkTreeCacheVersionV1_1 = "6" KeepGitRepoCacheVersionV1_1 = "3" )
View Source
const ( GitArchivesCacheVersion = "6" GitPatchesCacheVersion = "6" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArchiveMetadata ¶
type ArchiveMetadata struct {
LastAccessTimestamp int64
}
type GitArchiveDesc ¶
type GitArchiveDesc struct { MetadataPath string ArchivePath string Metadata *ArchiveMetadata Size uint64 }
func GetExistingGitArchives ¶
func GetExistingGitArchives(cacheVersionRoot string) ([]*GitArchiveDesc, error)
func (*GitArchiveDesc) GetLastAccessAt ¶
func (entry *GitArchiveDesc) GetLastAccessAt() time.Time
func (*GitArchiveDesc) GetPaths ¶
func (entry *GitArchiveDesc) GetPaths() []string
func (*GitArchiveDesc) GetSize ¶
func (entry *GitArchiveDesc) GetSize() uint64
type GitDataEntry ¶
type GitDataLruSort ¶
type GitDataLruSort []GitDataEntry
func (GitDataLruSort) Len ¶
func (a GitDataLruSort) Len() int
func (GitDataLruSort) Less ¶
func (a GitDataLruSort) Less(i, j int) bool
func (GitDataLruSort) Swap ¶
func (a GitDataLruSort) Swap(i, j int)
type GitDataManager ¶
func GetHostGitDataManager ¶
func GetHostGitDataManager(ctx context.Context) (*GitDataManager, error)
func NewGitDataManager ¶
func NewGitDataManager(archivesCacheDir, patchesCacheDir, tmpDir string) *GitDataManager
func (*GitDataManager) CreateArchiveFile ¶
func (manager *GitDataManager) CreateArchiveFile(ctx context.Context, repoID string, opts git_repo.ArchiveOptions, tmpPath string) (*git_repo.ArchiveFile, error)
func (*GitDataManager) CreatePatchFile ¶
func (manager *GitDataManager) CreatePatchFile(ctx context.Context, repoID string, opts git_repo.PatchOptions, tmpPath string, desc *true_git.PatchDescriptor) (*git_repo.PatchFile, error)
func (*GitDataManager) GetArchiveFile ¶
func (manager *GitDataManager) GetArchiveFile(ctx context.Context, repoID string, opts git_repo.ArchiveOptions) (*git_repo.ArchiveFile, error)
func (*GitDataManager) GetArchivesCacheDir ¶
func (manager *GitDataManager) GetArchivesCacheDir() string
func (*GitDataManager) GetPatchFile ¶
func (manager *GitDataManager) GetPatchFile(ctx context.Context, repoID string, opts git_repo.PatchOptions) (*git_repo.PatchFile, error)
func (*GitDataManager) GetPatchesCacheDir ¶
func (manager *GitDataManager) GetPatchesCacheDir() string
func (*GitDataManager) LockGC ¶
func (manager *GitDataManager) LockGC(ctx context.Context, shared bool) (lockgate.LockHandle, error)
func (*GitDataManager) NewTmpFile ¶
func (manager *GitDataManager) NewTmpFile() (string, error)
type GitPatchDesc ¶
type GitPatchDesc struct { MetadataPath string PatchPath string Metadata *PatchMetadata Size uint64 }
func GetExistingGitPatches ¶
func GetExistingGitPatches(cacheVersionRoot string) ([]*GitPatchDesc, error)
func (*GitPatchDesc) GetLastAccessAt ¶
func (entry *GitPatchDesc) GetLastAccessAt() time.Time
func (*GitPatchDesc) GetPaths ¶
func (entry *GitPatchDesc) GetPaths() []string
func (*GitPatchDesc) GetSize ¶
func (entry *GitPatchDesc) GetSize() uint64
type GitRepoDesc ¶
func GetExistingGitRepos ¶
func GetExistingGitRepos(cacheVersionRoot string) ([]*GitRepoDesc, error)
func (*GitRepoDesc) GetLastAccessAt ¶
func (entry *GitRepoDesc) GetLastAccessAt() time.Time
func (*GitRepoDesc) GetPaths ¶
func (entry *GitRepoDesc) GetPaths() []string
func (*GitRepoDesc) GetSize ¶
func (entry *GitRepoDesc) GetSize() uint64
type GitWorktreeDesc ¶
func GetExistingGitWorktrees ¶
func GetExistingGitWorktrees(cacheVersionRoot string) ([]*GitWorktreeDesc, error)
func (*GitWorktreeDesc) GetLastAccessAt ¶
func (entry *GitWorktreeDesc) GetLastAccessAt() time.Time
func (*GitWorktreeDesc) GetPaths ¶
func (entry *GitWorktreeDesc) GetPaths() []string
func (*GitWorktreeDesc) GetSize ¶
func (entry *GitWorktreeDesc) GetSize() uint64
type PatchMetadata ¶
type PatchMetadata struct { Descriptor *true_git.PatchDescriptor LastAccessTimestamp int64 }
Click to show internal directories.
Click to hide internal directories.