cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Get(req *http.Request) *http.Response
	Set(resp *http.Response) *http.Response
	Delete(req *http.Request)
}

func BackendFromOptions

func BackendFromOptions(t string, o map[string]interface{}) (Backend, error)

type Cache

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

func NewCache

func NewCache(cfg *config.Cache) *Cache

func (*Cache) CacheGet

func (c *Cache) CacheGet(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response)

func (*Cache) CacheSet

func (c *Cache) CacheSet(resp *http.Response, ctx *goproxy.ProxyCtx) *http.Response

func (*Cache) Register

func (c *Cache) Register(proxy *goproxy.ProxyHttpServer)

type ContextData

type ContextData map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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