reverseproxycache

package
v1.1.0-beta5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package reverseproxycache provides the HTTP Reverse Proxy Cache Origin Type

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client Implements the Proxy Client Interface

func NewClient

func NewClient(name string, oc *oo.Options, router http.Handler,
	cache cache.Cache) (*Client, error)

NewClient returns a new Client Instance

func (*Client) Cache

func (c *Client) Cache() cache.Cache

Cache returns and handle to the Cache instance used by the Client

func (*Client) Configuration

func (c *Client) Configuration() *oo.Options

Configuration returns the upstream Configuration for this Client

func (*Client) DefaultPathConfigs

func (c *Client) DefaultPathConfigs(oc *oo.Options) map[string]*po.Options

DefaultPathConfigs returns the default PathConfigs for the given OriginType

func (*Client) HTTPClient

func (c *Client) HTTPClient() *http.Client

HTTPClient returns the HTTP Transport the client is using

func (*Client) Handlers

func (c *Client) Handlers() map[string]http.Handler

Handlers returns a map of the HTTP Handlers the client has registered

func (*Client) HealthHandler

func (c *Client) HealthHandler(w http.ResponseWriter, r *http.Request)

HealthHandler checks the health of the Configured Upstream Origin

func (*Client) Name

func (c *Client) Name() string

Name returns the name of the upstream Configuration proxied by the Client

func (*Client) ProxyCacheHandler

func (c *Client) ProxyCacheHandler(w http.ResponseWriter, r *http.Request)

ProxyCacheHandler routes an HTTP Request through the Object Proxy Cache

func (*Client) ProxyHandler

func (c *Client) ProxyHandler(w http.ResponseWriter, r *http.Request)

ProxyHandler will proxy the inbound HTTP Request to the configured origin

func (*Client) Router

func (c *Client) Router() http.Handler

Router returns the http.Handler that handles request routing for this Client

func (*Client) SetCache

func (c *Client) SetCache(cc cache.Cache)

SetCache sets the Cache object the client will use when caching origin content

Jump to

Keyboard shortcuts

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