cache

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: Apache-2.0 Imports: 11 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(inputs []string, 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
	Enabled() bool
	BaseURL() string
	Writer(string, string) (io.WriteCloser, string, 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