cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cache provides functionality for cache storage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Get(string) (io.ReadCloser, error)
	Put(string, io.ReadSeeker) error
}

Backend implements operations for caching files

type Cache

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

Cache contains configuration for Cache functionality

func New

func New(b Backend, archiveFmt string) Cache

New creates a new cache with given parameters

func (Cache) Pull added in v1.0.0

func (c Cache) Pull(src, dst string) error

Pull fetches the archived file from the cache and restores to the host machine's file system

func (Cache) Push added in v1.0.0

func (c Cache) Push(src, dst string) error

Push pushes the archived file to the cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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