praefectutil

package
v15.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DerivePoolPath

func DerivePoolPath(repositoryID int64) string

DerivePoolPath derives an object pools's disk storage path from its repository ID. The repository ID is hashed with SHA256 and the first four hex digits of the hash are used as the two subdirectories to ensure even distribution into subdirectories. The format is @cluster/pools/ab/cd/<repository-id>. The pools have a different directory prefix from other repositories so Gitaly can identify them in OptimizeRepository and avoid pruning them.

func DeriveReplicaPath

func DeriveReplicaPath(repositoryID int64) string

DeriveReplicaPath derives a repository's disk storage path from its repository ID. The repository ID is hashed with SHA256 and the first four hex digits of the hash are used as the two subdirectories to ensure even distribution into subdirectories. The format is @cluster/repositories/ab/cd/<repository-id>.

func IsPoolPath

func IsPoolPath(relativePath string) bool

IsPoolPath returns whether the relative path indicates this is a Praefect generated object pool path.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL