local

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalCache

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

func InitLocalCache

func InitLocalCache(path string, debug bool) (*LocalCache, error)

init local cache and populate with data

func (LocalCache) Get

func (c LocalCache) Get(hash string, maxAge int) ([]byte, error)

get file from cache

func (LocalCache) RunCleanUp added in v0.1.0

func (c LocalCache) RunCleanUp(maxAge int)

run cleanup service

func (LocalCache) Save

func (c LocalCache) Save(hash string, data []byte) error

save to cache

Jump to

Keyboard shortcuts

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