Documentation
¶
Index ¶
- func AcquirePathLock(sourcePath string) func()
- func ReadRevision(dataMountPath, sourcePath string, sourceType config.SourceType) (string, error)
- func RemoveRevision(dataMountPath, sourcePath string, sourceType config.SourceType) error
- func WriteRevision(dataMountPath, sourcePath string, sourceType config.SourceType, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquirePathLock ¶
func AcquirePathLock(sourcePath string) func()
AcquirePathLock serializes access to cached source contents for one repository path, both within this process and across separate doco-cd processes/containers that share the same path (e.g. two instances mounting the same data volume for a self-update setup). The in-process mutex is acquired first to avoid redundant flock syscalls between goroutines; the flock then extends that exclusion to other processes.
func ReadRevision ¶
func ReadRevision(dataMountPath, sourcePath string, sourceType config.SourceType) (string, error)
ReadRevision returns the immutable revision recorded for a cached source directory.
func RemoveRevision ¶
func RemoveRevision(dataMountPath, sourcePath string, sourceType config.SourceType) error
RemoveRevision invalidates the recorded revision before cached source contents are replaced.
func WriteRevision ¶
func WriteRevision(dataMountPath, sourcePath string, sourceType config.SourceType, revision string) error
WriteRevision atomically records the immutable revision represented by a cached source directory.
Types ¶
This section is empty.