cache

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 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) Download

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

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

func (Cache) Upload

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

Upload 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