Documentation
¶
Index ¶
- Constants
- Variables
- func CommitDataToCommitRecord(c *graveler.CommitData) *graveler.CommitRecord
- func CommitRecordToCommitData(c *commitRecord) *graveler.CommitData
- func FindMergeBase(ctx context.Context, getter CommitGetter, ...) (*graveler.Commit, error)
- func Migrate(ctx context.Context, d *pgxpool.Pool, cfg blockparams.AdapterConfig, ...) error
- func MigrateWithBlockstore(ctx context.Context, d *pgxpool.Pool, writer io.Writer, bs block.Adapter, ...) error
- func ParseRef(r graveler.Ref) (graveler.RawRef, error)
- func ResolveRawRef(ctx context.Context, store Store, addressProvider ident.AddressProvider, ...) (*graveler.ResolvedRef, error)
- type BranchByCommitIterator
- func (b *BranchByCommitIterator) Close()
- func (b *BranchByCommitIterator) Err() error
- func (b *BranchByCommitIterator) Next() bool
- func (b *BranchByCommitIterator) SeekGE(_ graveler.BranchID)
- func (b *BranchByCommitIterator) SortByCommitID(i, j int) bool
- func (b *BranchByCommitIterator) Value() *graveler.BranchRecord
- type BranchIteratorOption
- type BranchLocker
- type BranchSimpleIterator
- type CommitGetter
- type CommitIterator
- type CommitNode
- type CommitsGenerationPriorityQueue
- type CompareFunc
- type DBBranchIterator
- type DBManager
- func (m *DBManager) AddCommit(ctx context.Context, repository *graveler.RepositoryRecord, ...) (graveler.CommitID, error)
- func (m *DBManager) BranchUpdate(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.BranchID, ...) error
- func (m *DBManager) CreateBareRepository(ctx context.Context, repositoryID graveler.RepositoryID, ...) (*graveler.RepositoryRecord, error)
- func (m *DBManager) CreateBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *DBManager) CreateRepository(ctx context.Context, repositoryID graveler.RepositoryID, ...) (*graveler.RepositoryRecord, error)
- func (m *DBManager) CreateTag(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *DBManager) DeleteBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *DBManager) DeleteRepository(ctx context.Context, repositoryID graveler.RepositoryID) error
- func (m *DBManager) DeleteTag(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *DBManager) FillGenerations(ctx context.Context, repository *graveler.RepositoryRecord) error
- func (m *DBManager) FindMergeBase(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Commit, error)
- func (m *DBManager) GCBranchIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
- func (m *DBManager) GCCommitIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
- func (m *DBManager) GetBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Branch, error)
- func (m *DBManager) GetCommit(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Commit, error)
- func (m *DBManager) GetCommitByPrefix(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Commit, error)
- func (m *DBManager) GetRepository(ctx context.Context, repositoryID graveler.RepositoryID) (*graveler.RepositoryRecord, error)
- func (m *DBManager) GetTag(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.CommitID, error)
- func (m *DBManager) ListBranches(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
- func (m *DBManager) ListCommits(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
- func (m *DBManager) ListRepositories(ctx context.Context) (graveler.RepositoryIterator, error)
- func (m *DBManager) ListTags(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.TagIterator, error)
- func (m *DBManager) Log(ctx context.Context, repository *graveler.RepositoryRecord, ...) (graveler.CommitIterator, error)
- func (m *DBManager) ParseRef(ref graveler.Ref) (graveler.RawRef, error)
- func (m *DBManager) RemoveCommit(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.CommitID) error
- func (m *DBManager) ResolveRawRef(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.ResolvedRef, error)
- func (m *DBManager) SetBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- type DBOrderedCommitIterator
- type DBRepositoryIterator
- type DBTagIterator
- type KVManager
- func (m *KVManager) AddCommit(ctx context.Context, repository *graveler.RepositoryRecord, ...) (graveler.CommitID, error)
- func (m *KVManager) BranchUpdate(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *KVManager) CreateBareRepository(ctx context.Context, repositoryID graveler.RepositoryID, ...) (*graveler.RepositoryRecord, error)
- func (m *KVManager) CreateBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *KVManager) CreateRepository(ctx context.Context, repositoryID graveler.RepositoryID, ...) (*graveler.RepositoryRecord, error)
- func (m *KVManager) CreateTag(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *KVManager) DeleteBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *KVManager) DeleteRepository(ctx context.Context, repositoryID graveler.RepositoryID) error
- func (m *KVManager) DeleteTag(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *KVManager) FindMergeBase(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Commit, error)
- func (m *KVManager) GCBranchIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
- func (m *KVManager) GCCommitIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
- func (m *KVManager) GetBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Branch, error)
- func (m *KVManager) GetCommit(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Commit, error)
- func (m *KVManager) GetCommitByPrefix(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.Commit, error)
- func (m *KVManager) GetRepository(ctx context.Context, repositoryID graveler.RepositoryID) (*graveler.RepositoryRecord, error)
- func (m *KVManager) GetTag(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.CommitID, error)
- func (m *KVManager) ListBranches(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
- func (m *KVManager) ListCommits(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
- func (m *KVManager) ListRepositories(ctx context.Context) (graveler.RepositoryIterator, error)
- func (m *KVManager) ListTags(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.TagIterator, error)
- func (m *KVManager) Log(ctx context.Context, repository *graveler.RepositoryRecord, ...) (graveler.CommitIterator, error)
- func (m *KVManager) ParseRef(ref graveler.Ref) (graveler.RawRef, error)
- func (m *KVManager) RemoveCommit(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *KVManager) ResolveRawRef(ctx context.Context, repository *graveler.RepositoryRecord, ...) (*graveler.ResolvedRef, error)
- func (m *KVManager) SetBranch(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- type KVOrderedCommitIterator
- type KVRepositoryIterator
- type KVTagIterator
- type OrderedCommitIteratorOption
- type RepositoryIterator
- type Store
Constants ¶
const BatchUpdateSQLSize = 10000
const IteratorPrefetchSize = 1000
IteratorPrefetchSize is the amount of records to maybeFetch from PG
const MaxBatchDelay = time.Millisecond * 3
MaxBatchDelay - 3ms was chosen as a max delay time for critical path queries. It trades off amount of queries per second (and thus effectiveness of the batching mechanism) with added latency. Since reducing # of expensive operations is only beneficial when there are a lot of concurrent requests,
the sweet spot is probably between 1-5 milliseconds (representing 200-1000 requests/second to the data store).
3ms of delay with ~300 requests/second per resource sounds like a reasonable tradeoff.
Variables ¶
var ErrIteratorClosed = errors.New("iterator already closed")
Functions ¶
func CommitDataToCommitRecord ¶ added in v0.70.0
func CommitDataToCommitRecord(c *graveler.CommitData) *graveler.CommitRecord
func CommitRecordToCommitData ¶ added in v0.70.0
func CommitRecordToCommitData(c *commitRecord) *graveler.CommitData
func FindMergeBase ¶ added in v0.41.1
func FindMergeBase(ctx context.Context, getter CommitGetter, repository *graveler.RepositoryRecord, leftID, rightID graveler.CommitID) (*graveler.Commit, error)
FindMergeBase finds the best common ancestor according to the definition in the git-merge-base documentation: https://git-scm.com/docs/git-merge-base One common ancestor is better than another common ancestor if the latter is an ancestor of the former.
func Migrate ¶ added in v0.70.0
func Migrate(ctx context.Context, d *pgxpool.Pool, cfg blockparams.AdapterConfig, writer io.Writer) error
func MigrateWithBlockstore ¶ added in v0.70.1
func ResolveRawRef ¶ added in v0.44.1
func ResolveRawRef(ctx context.Context, store Store, addressProvider ident.AddressProvider, repository *graveler.RepositoryRecord, rawRef graveler.RawRef) (*graveler.ResolvedRef, error)
Types ¶
type BranchByCommitIterator ¶ added in v0.70.0
type BranchByCommitIterator struct {
// contains filtered or unexported fields
}
BranchByCommitIterator iterates over repository's branches ordered by Commit ID. Currently, implemented as in-mem iterator
func NewBranchByCommitIterator ¶ added in v0.70.0
func NewBranchByCommitIterator(ctx context.Context, store *kv.StoreMessage, repo *graveler.RepositoryRecord) (*BranchByCommitIterator, error)
func (*BranchByCommitIterator) Close ¶ added in v0.70.0
func (b *BranchByCommitIterator) Close()
func (*BranchByCommitIterator) Err ¶ added in v0.70.0
func (b *BranchByCommitIterator) Err() error
func (*BranchByCommitIterator) Next ¶ added in v0.70.0
func (b *BranchByCommitIterator) Next() bool
func (*BranchByCommitIterator) SeekGE ¶ added in v0.70.0
func (b *BranchByCommitIterator) SeekGE(_ graveler.BranchID)
func (*BranchByCommitIterator) SortByCommitID ¶ added in v0.70.0
func (b *BranchByCommitIterator) SortByCommitID(i, j int) bool
func (*BranchByCommitIterator) Value ¶ added in v0.70.0
func (b *BranchByCommitIterator) Value() *graveler.BranchRecord
type BranchIteratorOption ¶ added in v0.45.1
type BranchIteratorOption func(bi *DBBranchIterator)
func WithOrderByCommitID ¶ added in v0.48.1
func WithOrderByCommitID() BranchIteratorOption
type BranchLocker ¶
type BranchLocker struct {
// contains filtered or unexported fields
}
BranchLocker enforces the branch locking logic with Postgres advisory lock The lock can be held by an arbitrary number of Writers or a single MetadataUpdater.
func NewBranchLocker ¶
func NewBranchLocker(db db.Database) *BranchLocker
func (*BranchLocker) MetadataUpdater ¶
func (l *BranchLocker) MetadataUpdater(ctx context.Context, repository *graveler.RepositoryRecord, branchID graveler.BranchID, lockedFn graveler.BranchLockerFunc) (interface{}, error)
MetadataUpdater tries to lock as committer using a Postgres advisory lock for the span of calling `lockedFn`. It returns ErrLockNotAcquired if it fails to acquire the lock.
func (*BranchLocker) Writer ¶
func (l *BranchLocker) Writer(ctx context.Context, repository *graveler.RepositoryRecord, branchID graveler.BranchID, lockedFn graveler.BranchLockerFunc) (interface{}, error)
Writer tries to acquire write lock using a Postgres advisory lock for the span of calling `lockedFn`. Returns ErrLockNotAcquired if it cannot acquire the lock.
type BranchSimpleIterator ¶ added in v0.70.0
type BranchSimpleIterator struct {
// contains filtered or unexported fields
}
BranchSimpleIterator Iterates over repository's branches in a sorted way, since the branches are already sorted in DB according to BranchID
func NewBranchSimpleIterator ¶ added in v0.70.0
func NewBranchSimpleIterator(ctx context.Context, store *kv.StoreMessage, repo *graveler.RepositoryRecord) (*BranchSimpleIterator, error)
func (*BranchSimpleIterator) Close ¶ added in v0.70.0
func (bi *BranchSimpleIterator) Close()
func (*BranchSimpleIterator) Err ¶ added in v0.70.0
func (bi *BranchSimpleIterator) Err() error
func (*BranchSimpleIterator) Next ¶ added in v0.70.0
func (bi *BranchSimpleIterator) Next() bool
func (*BranchSimpleIterator) SeekGE ¶ added in v0.70.0
func (bi *BranchSimpleIterator) SeekGE(id graveler.BranchID)
func (*BranchSimpleIterator) Value ¶ added in v0.70.0
func (bi *BranchSimpleIterator) Value() *graveler.BranchRecord
type CommitGetter ¶
type CommitIterator ¶
type CommitIterator struct {
// contains filtered or unexported fields
}
func NewCommitIterator ¶
func NewCommitIterator(ctx context.Context, repository *graveler.RepositoryRecord, start graveler.CommitID, manager graveler.RefManager) *CommitIterator
NewCommitIterator returns an iterator over all commits in the given repository. Ordering is based on the Commit Creation Date.
func (*CommitIterator) Close ¶
func (ci *CommitIterator) Close()
func (*CommitIterator) Err ¶
func (ci *CommitIterator) Err() error
func (*CommitIterator) Next ¶
func (ci *CommitIterator) Next() bool
func (*CommitIterator) SeekGE ¶
func (ci *CommitIterator) SeekGE(id graveler.CommitID)
SeekGE skip under the point of 'id' commit ID based on a new
The list of commit
func (*CommitIterator) Value ¶
func (ci *CommitIterator) Value() *graveler.CommitRecord
type CommitNode ¶ added in v0.62.0
type CommitNode struct {
// contains filtered or unexported fields
}
type CommitsGenerationPriorityQueue ¶ added in v0.41.1
type CommitsGenerationPriorityQueue []*graveler.CommitRecord
CommitsGenerationPriorityQueue implements heap.Interface such that the commit with the greatest Generation value is at the root of the heap.
func NewCommitsGenerationPriorityQueue ¶ added in v0.41.1
func NewCommitsGenerationPriorityQueue() CommitsGenerationPriorityQueue
func (CommitsGenerationPriorityQueue) Len ¶ added in v0.41.1
func (c CommitsGenerationPriorityQueue) Len() int
func (CommitsGenerationPriorityQueue) Less ¶ added in v0.41.1
func (c CommitsGenerationPriorityQueue) Less(i, j int) bool
func (*CommitsGenerationPriorityQueue) Pop ¶ added in v0.41.1
func (c *CommitsGenerationPriorityQueue) Pop() interface{}
func (*CommitsGenerationPriorityQueue) Push ¶ added in v0.41.1
func (c *CommitsGenerationPriorityQueue) Push(x interface{})
func (CommitsGenerationPriorityQueue) Swap ¶ added in v0.41.1
func (c CommitsGenerationPriorityQueue) Swap(i, j int)
type CompareFunc ¶ added in v0.70.0
CompareFunc type used for sorting in InMemIterator, it is a strictly bigger comparison function required for the sort.Slice algorithm, implementors need to decide how to handle equal values
type DBBranchIterator ¶ added in v0.70.0
type DBBranchIterator struct {
// contains filtered or unexported fields
}
func NewDBBranchIterator ¶ added in v0.70.0
func NewDBBranchIterator(ctx context.Context, db db.Database, repositoryID graveler.RepositoryID, prefetchSize int, opts ...BranchIteratorOption) *DBBranchIterator
func (*DBBranchIterator) Close ¶ added in v0.70.0
func (ri *DBBranchIterator) Close()
func (*DBBranchIterator) Err ¶ added in v0.70.0
func (ri *DBBranchIterator) Err() error
func (*DBBranchIterator) Next ¶ added in v0.70.0
func (ri *DBBranchIterator) Next() bool
func (*DBBranchIterator) SeekGE ¶ added in v0.70.0
func (ri *DBBranchIterator) SeekGE(id graveler.BranchID)
func (*DBBranchIterator) Value ¶ added in v0.70.0
func (ri *DBBranchIterator) Value() *graveler.BranchRecord
type DBManager ¶ added in v0.69.1
type DBManager struct {
// contains filtered or unexported fields
}
func NewPGRefManager ¶
func (*DBManager) BranchUpdate ¶ added in v0.70.0
func (m *DBManager) BranchUpdate(_ context.Context, _ *graveler.RepositoryRecord, _ graveler.BranchID, _ graveler.BranchUpdateFunc) error
BranchUpdate Implement refManager interface - in DB implementation simply panics
func (*DBManager) CreateBareRepository ¶ added in v0.69.1
func (m *DBManager) CreateBareRepository(ctx context.Context, repositoryID graveler.RepositoryID, repository graveler.Repository) (*graveler.RepositoryRecord, error)
func (*DBManager) CreateBranch ¶ added in v0.69.1
func (*DBManager) CreateRepository ¶ added in v0.69.1
func (m *DBManager) CreateRepository(ctx context.Context, repositoryID graveler.RepositoryID, repository graveler.Repository) (*graveler.RepositoryRecord, error)
func (*DBManager) DeleteBranch ¶ added in v0.69.1
func (*DBManager) DeleteRepository ¶ added in v0.69.1
func (*DBManager) FillGenerations ¶ added in v0.69.1
func (*DBManager) FindMergeBase ¶ added in v0.69.1
func (*DBManager) GCBranchIterator ¶ added in v0.70.0
func (m *DBManager) GCBranchIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
func (*DBManager) GCCommitIterator ¶ added in v0.70.0
func (m *DBManager) GCCommitIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
func (*DBManager) GetCommitByPrefix ¶ added in v0.69.1
func (*DBManager) GetRepository ¶ added in v0.69.1
func (m *DBManager) GetRepository(ctx context.Context, repositoryID graveler.RepositoryID) (*graveler.RepositoryRecord, error)
func (*DBManager) ListBranches ¶ added in v0.69.1
func (m *DBManager) ListBranches(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
func (*DBManager) ListCommits ¶ added in v0.69.1
func (m *DBManager) ListCommits(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
func (*DBManager) ListRepositories ¶ added in v0.69.1
func (*DBManager) ListTags ¶ added in v0.69.1
func (m *DBManager) ListTags(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.TagIterator, error)
func (*DBManager) Log ¶ added in v0.69.1
func (m *DBManager) Log(ctx context.Context, repository *graveler.RepositoryRecord, from graveler.CommitID) (graveler.CommitIterator, error)
func (*DBManager) RemoveCommit ¶ added in v0.70.0
func (*DBManager) ResolveRawRef ¶ added in v0.69.1
func (m *DBManager) ResolveRawRef(ctx context.Context, repository *graveler.RepositoryRecord, raw graveler.RawRef) (*graveler.ResolvedRef, error)
type DBOrderedCommitIterator ¶ added in v0.70.0
type DBOrderedCommitIterator struct {
// contains filtered or unexported fields
}
func NewDBOrderedCommitIterator ¶ added in v0.70.0
func NewDBOrderedCommitIterator(ctx context.Context, database db.Database, repository *graveler.RepositoryRecord, prefetchSize int, opts ...OrderedCommitIteratorOption) (*DBOrderedCommitIterator, error)
NewDBOrderedCommitIterator returns an iterator over all commits in the given repository. Ordering is based on the Commit ID value.
func (*DBOrderedCommitIterator) Close ¶ added in v0.70.0
func (iter *DBOrderedCommitIterator) Close()
func (*DBOrderedCommitIterator) Err ¶ added in v0.70.0
func (iter *DBOrderedCommitIterator) Err() error
func (*DBOrderedCommitIterator) Next ¶ added in v0.70.0
func (iter *DBOrderedCommitIterator) Next() bool
func (*DBOrderedCommitIterator) SeekGE ¶ added in v0.70.0
func (iter *DBOrderedCommitIterator) SeekGE(id graveler.CommitID)
func (*DBOrderedCommitIterator) Value ¶ added in v0.70.0
func (iter *DBOrderedCommitIterator) Value() *graveler.CommitRecord
type DBRepositoryIterator ¶ added in v0.70.0
type DBRepositoryIterator struct {
// contains filtered or unexported fields
}
func NewDBRepositoryIterator ¶ added in v0.70.0
func (*DBRepositoryIterator) Close ¶ added in v0.70.0
func (ri *DBRepositoryIterator) Close()
func (*DBRepositoryIterator) Err ¶ added in v0.70.0
func (ri *DBRepositoryIterator) Err() error
func (*DBRepositoryIterator) Next ¶ added in v0.70.0
func (ri *DBRepositoryIterator) Next() bool
func (*DBRepositoryIterator) SeekGE ¶ added in v0.70.0
func (ri *DBRepositoryIterator) SeekGE(id graveler.RepositoryID)
func (*DBRepositoryIterator) Value ¶ added in v0.70.0
func (ri *DBRepositoryIterator) Value() *graveler.RepositoryRecord
type DBTagIterator ¶ added in v0.69.1
type DBTagIterator struct {
// contains filtered or unexported fields
}
func NewDBTagIterator ¶ added in v0.69.1
func NewDBTagIterator(ctx context.Context, db db.Database, repositoryID graveler.RepositoryID, fetchSize int) (*DBTagIterator, error)
func (*DBTagIterator) Close ¶ added in v0.69.1
func (ri *DBTagIterator) Close()
func (*DBTagIterator) Err ¶ added in v0.69.1
func (ri *DBTagIterator) Err() error
func (*DBTagIterator) Next ¶ added in v0.69.1
func (ri *DBTagIterator) Next() bool
func (*DBTagIterator) SeekGE ¶ added in v0.69.1
func (ri *DBTagIterator) SeekGE(id graveler.TagID)
func (*DBTagIterator) Value ¶ added in v0.69.1
func (ri *DBTagIterator) Value() *graveler.TagRecord
type KVManager ¶ added in v0.69.1
type KVManager struct {
// contains filtered or unexported fields
}
func NewKVRefManager ¶ added in v0.69.1
func NewKVRefManager(executor batch.Batcher, kvStore kv.StoreMessage, addressProvider ident.AddressProvider) *KVManager
func (*KVManager) BranchUpdate ¶ added in v0.70.0
func (m *KVManager) BranchUpdate(ctx context.Context, repository *graveler.RepositoryRecord, branchID graveler.BranchID, f graveler.BranchUpdateFunc) error
func (*KVManager) CreateBareRepository ¶ added in v0.69.1
func (m *KVManager) CreateBareRepository(ctx context.Context, repositoryID graveler.RepositoryID, repository graveler.Repository) (*graveler.RepositoryRecord, error)
func (*KVManager) CreateBranch ¶ added in v0.69.1
func (*KVManager) CreateRepository ¶ added in v0.69.1
func (m *KVManager) CreateRepository(ctx context.Context, repositoryID graveler.RepositoryID, repository graveler.Repository) (*graveler.RepositoryRecord, error)
func (*KVManager) DeleteBranch ¶ added in v0.69.1
func (*KVManager) DeleteRepository ¶ added in v0.69.1
func (*KVManager) FindMergeBase ¶ added in v0.69.1
func (*KVManager) GCBranchIterator ¶ added in v0.70.0
func (m *KVManager) GCBranchIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
func (*KVManager) GCCommitIterator ¶ added in v0.70.0
func (m *KVManager) GCCommitIterator(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
func (*KVManager) GetCommitByPrefix ¶ added in v0.69.1
func (*KVManager) GetRepository ¶ added in v0.69.1
func (m *KVManager) GetRepository(ctx context.Context, repositoryID graveler.RepositoryID) (*graveler.RepositoryRecord, error)
func (*KVManager) ListBranches ¶ added in v0.69.1
func (m *KVManager) ListBranches(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.BranchIterator, error)
func (*KVManager) ListCommits ¶ added in v0.69.1
func (m *KVManager) ListCommits(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.CommitIterator, error)
func (*KVManager) ListRepositories ¶ added in v0.69.1
func (*KVManager) ListTags ¶ added in v0.69.1
func (m *KVManager) ListTags(ctx context.Context, repository *graveler.RepositoryRecord) (graveler.TagIterator, error)
func (*KVManager) Log ¶ added in v0.69.1
func (m *KVManager) Log(ctx context.Context, repository *graveler.RepositoryRecord, from graveler.CommitID) (graveler.CommitIterator, error)
func (*KVManager) RemoveCommit ¶ added in v0.70.0
func (*KVManager) ResolveRawRef ¶ added in v0.69.1
func (m *KVManager) ResolveRawRef(ctx context.Context, repository *graveler.RepositoryRecord, raw graveler.RawRef) (*graveler.ResolvedRef, error)
type KVOrderedCommitIterator ¶ added in v0.70.0
type KVOrderedCommitIterator struct {
// contains filtered or unexported fields
}
func NewKVOrderedCommitIterator ¶ added in v0.70.0
func NewKVOrderedCommitIterator(ctx context.Context, store *kv.StoreMessage, repo *graveler.RepositoryRecord, onlyAncestryLeaves bool) (*KVOrderedCommitIterator, error)
NewKVOrderedCommitIterator returns an iterator over all commits in the given repository. Ordering is based on the Commit ID value. WithOnlyAncestryLeaves causes the iterator to return only commits which are not the first parent of any other commit. Consider a commit graph where all non-first-parent edges are removed. This graph is a tree, and ancestry leaves are its leaves.
func (*KVOrderedCommitIterator) Close ¶ added in v0.70.0
func (i *KVOrderedCommitIterator) Close()
func (*KVOrderedCommitIterator) Err ¶ added in v0.70.0
func (i *KVOrderedCommitIterator) Err() error
func (*KVOrderedCommitIterator) Next ¶ added in v0.70.0
func (i *KVOrderedCommitIterator) Next() bool
func (*KVOrderedCommitIterator) SeekGE ¶ added in v0.70.0
func (i *KVOrderedCommitIterator) SeekGE(id graveler.CommitID)
func (*KVOrderedCommitIterator) Value ¶ added in v0.70.0
func (i *KVOrderedCommitIterator) Value() *graveler.CommitRecord
type KVRepositoryIterator ¶ added in v0.70.0
type KVRepositoryIterator struct {
// contains filtered or unexported fields
}
func NewKVRepositoryIterator ¶ added in v0.70.0
func NewKVRepositoryIterator(ctx context.Context, store *kv.StoreMessage) (*KVRepositoryIterator, error)
func (*KVRepositoryIterator) Close ¶ added in v0.70.0
func (ri *KVRepositoryIterator) Close()
func (*KVRepositoryIterator) Err ¶ added in v0.70.0
func (ri *KVRepositoryIterator) Err() error
func (*KVRepositoryIterator) Next ¶ added in v0.70.0
func (ri *KVRepositoryIterator) Next() bool
func (*KVRepositoryIterator) SeekGE ¶ added in v0.70.0
func (ri *KVRepositoryIterator) SeekGE(id graveler.RepositoryID)
func (*KVRepositoryIterator) Value ¶ added in v0.70.0
func (ri *KVRepositoryIterator) Value() *graveler.RepositoryRecord
type KVTagIterator ¶ added in v0.69.1
type KVTagIterator struct {
// contains filtered or unexported fields
}
func NewKVTagIterator ¶ added in v0.69.1
func NewKVTagIterator(ctx context.Context, store *kv.StoreMessage, repo *graveler.RepositoryRecord) (*KVTagIterator, error)
func (*KVTagIterator) Close ¶ added in v0.69.1
func (i *KVTagIterator) Close()
func (*KVTagIterator) Err ¶ added in v0.69.1
func (i *KVTagIterator) Err() error
func (*KVTagIterator) Next ¶ added in v0.69.1
func (i *KVTagIterator) Next() bool
func (*KVTagIterator) SeekGE ¶ added in v0.69.1
func (i *KVTagIterator) SeekGE(id graveler.TagID)
func (*KVTagIterator) Value ¶ added in v0.69.1
func (i *KVTagIterator) Value() *graveler.TagRecord
type OrderedCommitIteratorOption ¶ added in v0.45.1
type OrderedCommitIteratorOption func(oci *DBOrderedCommitIterator)
func WithOnlyAncestryLeaves ¶ added in v0.45.1
func WithOnlyAncestryLeaves() OrderedCommitIteratorOption
WithOnlyAncestryLeaves causes the iterator to return only commits which are not the first parent of any other commit. Consider a commit graph where all non-first-parent edges are removed. This graph is a tree, and ancestry leaves are its leaves.
type RepositoryIterator ¶
type RepositoryIterator interface { Next() bool SeekGE(id graveler.RepositoryID) Value() *graveler.RepositoryRecord Err() error Close() }
type Store ¶
type Store interface { GetBranch(ctx context.Context, repository *graveler.RepositoryRecord, branchID graveler.BranchID) (*graveler.Branch, error) GetTag(ctx context.Context, repository *graveler.RepositoryRecord, tagID graveler.TagID) (*graveler.CommitID, error) GetCommitByPrefix(ctx context.Context, repository *graveler.RepositoryRecord, prefix graveler.CommitID) (*graveler.Commit, error) GetCommit(ctx context.Context, repository *graveler.RepositoryRecord, prefix graveler.CommitID) (*graveler.Commit, error) }
Source Files
¶
- branch_iterator.go
- branch_locker.go
- commit_generation_priority_queue.go
- commit_iterator.go
- commit_ordered_iterator.go
- commit_record.go
- db_branch_iterator.go
- db_commit_ordered_iterator.go
- db_manager.go
- db_repository_iterator.go
- db_tag_iterator.go
- iterator.go
- manager.go
- merge_base_finder.go
- parse_ref.go
- repository_iterator.go
- resolve_ref.go
- tag_iterator.go