http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Name  string
	Value string
}

Header defines a HTTP header to be passed to the proxied server.

type Location

type Location struct {
	Return          *Return
	Path            string
	ProxyPass       string
	HTTPMatchVar    string
	ProxySetHeaders []Header
	Internal        bool
}

Location holds all configuration for an HTTP location.

type Map

type Map struct {
	Source     string
	Variable   string
	Parameters []MapParameter
}

Map defines an NGINX map.

type MapParameter

type MapParameter struct {
	Value  string
	Result string
}

Parameter defines a Value and Result pair in a Map.

type Return

type Return struct {
	Body string
	Code StatusCode
}

Return represents an HTTP return.

type SSL

type SSL struct {
	Certificate    string
	CertificateKey string
}

SSL holds all SSL related configuration.

type Server

type Server struct {
	SSL           *SSL
	ServerName    string
	Locations     []Location
	IsDefaultHTTP bool
	IsDefaultSSL  bool
	Port          int32
}

Server holds all configuration for an HTTP server.

type SplitClient

type SplitClient struct {
	VariableName  string
	Distributions []SplitClientDistribution
}

SplitClient holds all configuration for an HTTP split client.

type SplitClientDistribution

type SplitClientDistribution struct {
	Percent string
	Value   string
}

SplitClientDistribution maps Percentage to Value in a SplitClient.

type StatusCode

type StatusCode int

StatusCode is an HTTP status code.

const (
	// StatusFound is the HTTP 302 status code.
	StatusFound StatusCode = 302
	// StatusNotFound is the HTTP 404 status code.
	StatusNotFound StatusCode = 404
	// StatusInternalServerError is the HTTP 500 status code.
	StatusInternalServerError StatusCode = 500
)

type Upstream

type Upstream struct {
	Name    string
	Servers []UpstreamServer
}

Upstream holds all configuration for an HTTP upstream.

type UpstreamServer

type UpstreamServer struct {
	Address string
}

UpstreamServer holds all configuration for an HTTP upstream server.

Jump to

Keyboard shortcuts

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