consistenthash

package
v7.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RouterRequestTimeout = time.Second * 10

Variables

This section is empty.

Functions

func Post

func Post(w http.ResponseWriter, r *http.Request)

Post is the handler for POST requests to /consistenthash.

Types

type TRConsistentHashRequest

type TRConsistentHashRequest struct {
	ConsistentHashRegex string `json:"regex"`
	RequestPath         string `json:"requestPath"`
	CdnID               int64  `json:"cdnId"`
}

struct for the incoming request object

type TRConsistentHashResult

type TRConsistentHashResult struct {
	ResultingPathToConsistentHash string `json:"resultingPathToConsistentHash"`
	ConsistentHashRegex           string `json:"consistentHashRegex"`
	RequestPath                   string `json:"requestPath"`
}

struct for the response object from Traffic Router

Jump to

Keyboard shortcuts

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