cache

package
v0.119.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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