consistenthash

package
v5.1.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 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)

endpoint to test Traffic Router's Pattern-Based Consistent Hashing feature /api/1.5/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