proxycache

package
v0.0.0-...-a5a65f0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 17 Imported by: 27

Documentation

Overview

Package proxycache registers the "proxycache" blobserver storage type, which uses a provided blobserver as a cache for a second origin blobserver.

The proxycache blobserver type also takes a sorted.KeyValue reference which it uses as the LRU for which old items to evict from the cache.

Example config:

      "/cache/": {
          "handler": "storage-proxycache",
          "handlerArgs": {
		  "origin": "",
		  "cache": "",
		  "meta": {},
		  "maxCacheBytes": 536870912
          }
      },

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(maxBytes int64, cache, origin blobserver.Storage) blobserver.Storage

Types

type CacheHasExtraError

type CacheHasExtraError struct {
	Ref  blob.Ref
	Size uint32
}

func (CacheHasExtraError) Error

func (e CacheHasExtraError) Error() string

type CacheHasWrongSizeError

type CacheHasWrongSizeError struct {
	Ref                   blob.Ref
	OriginSize, CacheSize uint32
}

func (CacheHasWrongSizeError) Error

func (e CacheHasWrongSizeError) Error() string

type CacheMissingRefError

type CacheMissingRefError struct {
	Ref  blob.Ref
	Size uint32
}

func (CacheMissingRefError) Error

func (e CacheMissingRefError) Error() string

Jump to

Keyboard shortcuts

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