cache

package
v0.0.0-...-0f3ec1e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCacheMiss = errors.New("cache miss")
)

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// Get returns a reader providing access to the named cache object. An
	// ErrCacheMiss is returned if the object does not exist. Other
	// implementation specific errors may be returned. The caller must close
	// the reader when finished. If the context expires during the get
	// operation then the operation is cancelled and ctx.Err() is returned.
	Get(context.Context, string) (io.ReadCloser, error)

	// Put caches the contents of a reader with the given name. An error is
	// returned on failure. If the context expires during the get operation
	// then the operation is cancelled and ctx.Err() is returned.
	Put(context.Context, string, io.Reader) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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