rule

package
Version: v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

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, options *oo.Options, router http.Handler,
	clients origins.Origins) (*Client, error)

NewClient returns a new Rules Router client reference

func (*Client) Cache

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

Cache is not used by the Rule, and is present to conform to the Client interface

func (*Client) Configuration

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

Configuration returns the Client Configuration

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 is not used by the Rule, and is present to conform to the Client interface

func (*Client) Handler

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

Handler processes the HTTP request through the rules engine

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) Name

func (c *Client) Name() string

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

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 is not used by the Rule, and is present to conform to the Client interface

type Clients

type Clients []*Client

Clients is a list of *rule.Client

func (Clients) Validate

func (rc Clients) Validate(rwi map[string]rewriter.RewriteInstructions) error

Validate will fully load the Clients from their options and return an error if the options could not be validated

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to