cache

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v0.4.9

type Cache struct {
	// contains filtered or unexported fields
}

Cache is used to mediate with the caching layer where all repositories for the various dependencies are kept. It relies on a locking mechanism to ensure safe access to the cache when things are executed concurrently or different instances of the tool run at the same time.

func New added in v0.4.9

func New(path string) *Cache

New cache manager pointing towards the path where it resides.

func (*Cache) GetRepository added in v0.4.9

func (c *Cache) GetRepository(dep *vending.Dependency) (*git.Repository, error)

GetRepository returns git.Repository from the cache.

func (*Cache) Init added in v0.4.9

func (c *Cache) Init() error

Init ensures proper directory structure of the cache exists.

func (*Cache) Lock added in v0.4.9

func (c *Cache) Lock() (*lock.Lock, error)

Lock acquires the global cache lock. This can be used to ensure only one agent is manipulating the cache and its contents.

func (*Cache) Reset added in v0.4.9

func (c *Cache) Reset() error

Reset removes all contents in the cache root directory and immediately initialises the cache again.

Jump to

Keyboard shortcuts

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