cache

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheJob

func CacheJob(c Cache, callback func(*config.Job) error) func(*config.Job) error

func HashFile

func HashFile(filePath string) (string, error)

func HashJob

func HashJob(job *config.Job) (string, error)

func LoadCache

func LoadCache(c Cache, cacheKey string, job *config.Job) (bool, error)

func WalkInputs

func WalkInputs(job *config.Job, fn func(string) error) error

Types

type Cache

type Cache interface {
	Name() string
	Env() map[string]string
	Get(namespace string, entry CacheEntry) error
	Set(namespace, filePath string) (CacheEntry, error)
	LoadCacheManifest(namespace, cacheKey string) ([]CacheEntry, error)
	DumpCacheManifest(namespace, cacheKey string, entries []CacheEntry) error
}

type CacheEntry

type CacheEntry struct {
	Filename string
	Hash     string
	FileMode os.FileMode
}

func DumpOutputs

func DumpOutputs(cacheKey string, c Cache, outputs []string) ([]CacheEntry, error)

func (*CacheEntry) LoadAttrs

func (c *CacheEntry) LoadAttrs() error

func (CacheEntry) SyncAttrs

func (c CacheEntry) SyncAttrs() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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