cache

package
v0.0.0-...-3402942 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearTemporaryDirs

func ClearTemporaryDirs()

func ClearTerraformDir

func ClearTerraformDir()

Types

type DummyCache

type DummyCache struct{}

DummyCache is a cache implementation which saves nothing and nowhere

func (*DummyCache) Clean

func (d *DummyCache) Clean()

func (*DummyCache) CleanWithExceptions

func (d *DummyCache) CleanWithExceptions(e ...string)

func (*DummyCache) Delete

func (d *DummyCache) Delete(n string)

func (*DummyCache) GetPath

func (d *DummyCache) GetPath(n string) string

func (*DummyCache) InCache

func (d *DummyCache) InCache(n string) (bool, error)

func (*DummyCache) Iterate

func (d *DummyCache) Iterate(func(string, []byte) error) error

func (*DummyCache) Load

func (d *DummyCache) Load(n string) ([]byte, error)

func (*DummyCache) LoadStruct

func (d *DummyCache) LoadStruct(n string, v interface{}) error

func (*DummyCache) NeedIntermediateSave

func (d *DummyCache) NeedIntermediateSave() bool

func (*DummyCache) Save

func (d *DummyCache) Save(n string, c []byte) error

func (*DummyCache) SaveStruct

func (d *DummyCache) SaveStruct(n string, v interface{}) error

type StateCache

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

func NewStateCache

func NewStateCache(dir string) (*StateCache, error)

NewTempStateCache creates new cache instance in specified directory

func NewStateCacheWithInitialState

func NewStateCacheWithInitialState(dir string, initialState map[string][]byte) (*StateCache, error)

NewStateCacheWithInitialState creates new cache instance in specified directory with initial state

func NewTempStateCache

func NewTempStateCache(identity string) (*StateCache, error)

NewTempStateCache creates new cache instance in tmp directory

func (*StateCache) Clean

func (s *StateCache) Clean()

func (*StateCache) CleanWithExceptions

func (s *StateCache) CleanWithExceptions(excludeKeys ...string)

func (*StateCache) Delete

func (s *StateCache) Delete(name string)

func (*StateCache) GetPath

func (s *StateCache) GetPath(name string) string

func (*StateCache) InCache

func (s *StateCache) InCache(name string) (bool, error)

InCache checks is file in cache or not

func (*StateCache) Iterate

func (s *StateCache) Iterate(iterFunc func(string, []byte) error) error

func (*StateCache) Load

func (s *StateCache) Load(name string) ([]byte, error)

func (*StateCache) LoadStruct

func (s *StateCache) LoadStruct(name string, v interface{}) error

LoadStruct loads go struct from the cache

func (*StateCache) NeedIntermediateSave

func (s *StateCache) NeedIntermediateSave() bool

func (*StateCache) Save

func (s *StateCache) Save(name string, content []byte) error

SaveStruct saves bytes to a file

func (*StateCache) SaveStruct

func (s *StateCache) SaveStruct(name string, v interface{}) error

SaveStruct saves go struct into the cache as a blob

Jump to

Keyboard shortcuts

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