Documentation ¶
Index ¶
- Variables
- type CommitNode
- type GCStartingPoint
- type GCStartingPointIterator
- type GarbageCollectionCommits
- type GarbageCollectionManager
- func (m *GarbageCollectionManager) GetAddressesLocation(sn graveler.StorageNamespace) (string, error)
- func (m *GarbageCollectionManager) GetCommitsCSVLocation(runID string, sn graveler.StorageNamespace) (string, error)
- func (m *GarbageCollectionManager) GetRules(ctx context.Context, storageNamespace graveler.StorageNamespace) (*graveler.GarbageCollectionRules, error)
- func (m *GarbageCollectionManager) GetRunExpiredCommits(ctx context.Context, storageNamespace graveler.StorageNamespace, runID string) ([]graveler.CommitID, error)
- func (m *GarbageCollectionManager) GetUncommittedLocation(runID string, sn graveler.StorageNamespace) (string, error)
- func (m *GarbageCollectionManager) NewID() string
- func (m *GarbageCollectionManager) SaveGarbageCollectionCommits(ctx context.Context, repository *graveler.RepositoryRecord, ...) (string, error)
- func (m *GarbageCollectionManager) SaveGarbageCollectionUncommitted(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *GarbageCollectionManager) SaveRules(ctx context.Context, storageNamespace graveler.StorageNamespace, ...) error
- type RepositoryCommitGetter
Constants ¶
This section is empty.
Variables ¶
var ErrCommitNotFound = errors.New("commit not found")
Functions ¶
This section is empty.
Types ¶
type CommitNode ¶ added in v0.96.0
func NewCommitNode ¶ added in v0.96.0
func NewCommitNode(creationDate time.Time, mainParent graveler.CommitID) CommitNode
type GCStartingPoint ¶ added in v0.45.1
A GCStartingPoint represents a commit from which the GC algorithm should start scanning. It could be either a branch HEAD, or a dangling commit. The CommitID field is always set, while BranchID is set only if the commit is a branch HEAD.
type GCStartingPointIterator ¶ added in v0.45.1
type GCStartingPointIterator struct {
// contains filtered or unexported fields
}
GCStartingPointIterator combines a branch iterator and a commit iterator. Both are assumed to be sorted and to contain no duplicates. Each returned GCStartingPoint object contains the commit id. If the entry came from the branch iterator, it also contains the branch id. Commits appearing in both iterators appear only once and include the branch id. Closing this iterator will close the two internal iterators.
func NewGCStartingPointIterator ¶ added in v0.45.1
func NewGCStartingPointIterator(commitIterator graveler.CommitIterator, branchIterator graveler.BranchIterator) *GCStartingPointIterator
func (*GCStartingPointIterator) Close ¶ added in v0.45.1
func (sp *GCStartingPointIterator) Close()
func (*GCStartingPointIterator) Err ¶ added in v0.45.1
func (sp *GCStartingPointIterator) Err() error
func (*GCStartingPointIterator) Next ¶ added in v0.45.1
func (sp *GCStartingPointIterator) Next() bool
func (*GCStartingPointIterator) Value ¶ added in v0.45.1
func (sp *GCStartingPointIterator) Value() *GCStartingPoint
type GarbageCollectionCommits ¶
type GarbageCollectionCommits struct {
// contains filtered or unexported fields
}
func GetGarbageCollectionCommits ¶
func GetGarbageCollectionCommits(ctx context.Context, startingPointIterator *GCStartingPointIterator, commitGetter *RepositoryCommitGetter, rules *graveler.GarbageCollectionRules, previouslyExpired []graveler.CommitID) (*GarbageCollectionCommits, error)
GetGarbageCollectionCommits returns the sets of expired and active commits, according to the repository's garbage collection rules. See https://github.com/treeverse/lakeFS/issues/1932 for more details. Upon completion, the given startingPointIterator is closed.
type GarbageCollectionManager ¶
type GarbageCollectionManager struct {
// contains filtered or unexported fields
}
func NewGarbageCollectionManager ¶
func NewGarbageCollectionManager(blockAdapter block.Adapter, refManager graveler.RefManager, committedBlockStoragePrefix string) *GarbageCollectionManager
func (*GarbageCollectionManager) GetAddressesLocation ¶ added in v0.44.0
func (m *GarbageCollectionManager) GetAddressesLocation(sn graveler.StorageNamespace) (string, error)
func (*GarbageCollectionManager) GetCommitsCSVLocation ¶ added in v0.44.0
func (m *GarbageCollectionManager) GetCommitsCSVLocation(runID string, sn graveler.StorageNamespace) (string, error)
func (*GarbageCollectionManager) GetRules ¶
func (m *GarbageCollectionManager) GetRules(ctx context.Context, storageNamespace graveler.StorageNamespace) (*graveler.GarbageCollectionRules, error)
func (*GarbageCollectionManager) GetRunExpiredCommits ¶
func (m *GarbageCollectionManager) GetRunExpiredCommits(ctx context.Context, storageNamespace graveler.StorageNamespace, runID string) ([]graveler.CommitID, error)
func (*GarbageCollectionManager) GetUncommittedLocation ¶ added in v0.85.0
func (m *GarbageCollectionManager) GetUncommittedLocation(runID string, sn graveler.StorageNamespace) (string, error)
GetUncommittedLocation return full path to underlying storage path to store uncommitted information
func (*GarbageCollectionManager) NewID ¶ added in v0.85.0
func (m *GarbageCollectionManager) NewID() string
func (*GarbageCollectionManager) SaveGarbageCollectionCommits ¶
func (m *GarbageCollectionManager) SaveGarbageCollectionCommits(ctx context.Context, repository *graveler.RepositoryRecord, rules *graveler.GarbageCollectionRules, previouslyExpiredCommits []graveler.CommitID) (string, error)
func (*GarbageCollectionManager) SaveGarbageCollectionUncommitted ¶ added in v0.85.0
func (m *GarbageCollectionManager) SaveGarbageCollectionUncommitted(ctx context.Context, repository *graveler.RepositoryRecord, filename, runID string) error
func (*GarbageCollectionManager) SaveRules ¶
func (m *GarbageCollectionManager) SaveRules(ctx context.Context, storageNamespace graveler.StorageNamespace, rules *graveler.GarbageCollectionRules) error
type RepositoryCommitGetter ¶
type RepositoryCommitGetter struct {
// contains filtered or unexported fields
}
func (*RepositoryCommitGetter) ListCommits ¶ added in v0.96.0
func (r *RepositoryCommitGetter) ListCommits(ctx context.Context) (graveler.CommitIterator, error)