Documentation
¶
Overview ¶
Package read provides routines for reading commit graphs.
Index ¶
- type BloomUnavailableError
- type Commit
- type LayerInfo
- type MalformedError
- type NotFoundError
- type OpenMode
- type ParentRef
- type Position
- type PositionOutOfRangeError
- type Reader
- func (reader *Reader) AllOIDs() iter.Seq[objectid.ObjectID]
- func (reader *Reader) AllPositions() iter.Seq[Position]
- func (reader *Reader) BloomFilterAt(pos Position) (*bloom.Filter, error)
- func (reader *Reader) BloomVersion() uint8
- func (reader *Reader) Close() error
- func (reader *Reader) CommitAt(pos Position) (Commit, error)
- func (reader *Reader) HasBloom() bool
- func (reader *Reader) HashVersion() uint8
- func (reader *Reader) Layers() []LayerInfo
- func (reader *Reader) Lookup(oid objectid.ObjectID) (Position, error)
- func (reader *Reader) NumCommits() uint32
- func (reader *Reader) OIDAt(pos Position) (objectid.ObjectID, error)
- type UnsupportedVersionError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BloomUnavailableError ¶ added in v0.1.68
type BloomUnavailableError struct {
}
BloomUnavailableError reports missing changed-path bloom data at one position.
func (*BloomUnavailableError) Error ¶ added in v0.1.68
func (err *BloomUnavailableError) Error() string
Error implements error.
type Commit ¶
type Commit struct {
OID objectid.ObjectID
TreeOID objectid.ObjectID
Parent1 ParentRef
Parent2 ParentRef
ExtraParents []Position
CommitTimeUnix int64
GenerationV1 uint32
GenerationV2 uint64
}
Commit stores decoded commit-graph record data.
type MalformedError ¶ added in v0.1.68
MalformedError reports malformed commit-graph data.
func (*MalformedError) Error ¶ added in v0.1.68
func (err *MalformedError) Error() string
Error implements error.
type NotFoundError ¶ added in v0.1.68
NotFoundError reports a missing commit graph entry by object ID.
func (*NotFoundError) Error ¶ added in v0.1.68
func (err *NotFoundError) Error() string
Error implements error.
type PositionOutOfRangeError ¶ added in v0.1.68
type PositionOutOfRangeError struct {
Pos Position
}
PositionOutOfRangeError reports an invalid graph position.
func (*PositionOutOfRangeError) Error ¶ added in v0.1.68
func (err *PositionOutOfRangeError) Error() string
Error implements error.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader provides read-only access to one mmap-backed commit-graph snapshot.
It is safe for concurrent read-only queries.
func (*Reader) AllPositions ¶
AllPositions iterates all commit positions in native layer order.
func (*Reader) BloomFilterAt ¶
BloomFilterAt returns one commit's changed-path Bloom filter.
Returns BloomUnavailableError when this commit graph has no Bloom data.
func (*Reader) BloomVersion ¶
BloomVersion returns the changed-path Bloom hash version, or 0 if absent.
func (*Reader) HashVersion ¶
HashVersion returns the commit-graph hash version.
func (*Reader) NumCommits ¶
NumCommits returns total commits across loaded layers.
type UnsupportedVersionError ¶ added in v0.1.68
type UnsupportedVersionError struct {
Version uint8
}
UnsupportedVersionError reports unsupported commit-graph version.
func (*UnsupportedVersionError) Error ¶ added in v0.1.68
func (err *UnsupportedVersionError) Error() string
Error implements error.