store

package
v0.0.0-...-14b8772 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Store is a simple disk-cache store for container images

func New

func New(dir string) *Store

New returns a new store in the specified directory

func (*Store) Clean

func (s *Store) Clean() error

Clean cleans up the cache store only from the elements that aren't currently accessed

func (*Store) CleanAll

func (s *Store) CleanAll() error

CleanAll cleans up the cache store

func (*Store) EnsureExists

func (s *Store) EnsureExists() error

EnsureExists ensures the store directory exists and have the correct permissions

func (*Store) Exists

func (s *Store) Exists(ss string) bool

Exists checks weather the given key exists in the cache

func (*Store) Path

func (s *Store) Path(p ...string) string

Path is syntax sugar to return a subpath from the cache store

func (*Store) String

func (s *Store) String() string

String return the underlying directory store

Jump to

Keyboard shortcuts

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