alternative

package module
v0.0.0-...-bf13849 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

README

client-go-alternative-services

Kubernetes client-go with client side load balancing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneHeader

func CloneHeader(in http.Header) http.Header

CloneHeader creates a deep copy of an http.Header.

func CloneRequest

func CloneRequest(req *http.Request) *http.Request

CloneRequest creates a shallow copy of the request along with a deep copy of the Headers.

func NewAlternativeServiceRoundTripper

func NewAlternativeServiceRoundTripper(rt http.RoundTripper) http.RoundTripper

NewAlternativeServiceRoundTripper returns a roundtipper that allows to connect to the Kubernetes api server, providing client side HA using Alt-Svc headers.

func NewAlternativeServiceRoundTripperWithOptions

func NewAlternativeServiceRoundTripperWithOptions(rt http.RoundTripper, options ...AlternativeServicesOptions) http.RoundTripper

NewAlternativeServiceRoundTripperWithOptions returns a roundtipper that allows to connect to the Kubernetes api server, providing client side HA using Alt-Svc headers. Allows to pass options.

func NewForConfig

func NewForConfig(c *rest.Config) (*kubernetes.Clientset, error)

func NewForConfigOrDie

func NewForConfigOrDie(c *rest.Config) *kubernetes.Clientset

NewForConfigOrDie creates a new Clientset for the given config and panics if there is an error in the config.

func NewForConfigWithAlternativeServices

func NewForConfigWithAlternativeServices(c *rest.Config, hosts []string) (*kubernetes.Clientset, error)

Types

type AlternativeServicesOptions

type AlternativeServicesOptions func(*alternativeServiceRoundTripper) *alternativeServiceRoundTripper

func WithActivePolling

func WithActivePolling() AlternativeServicesOptions

WithActivePolling allows to poll the API server directly to get the list of endpoints (disabled by default)

func WithAlternativeServerName

func WithAlternativeServerName(serverName string) AlternativeServicesOptions

WithAlternativeServerName sets the TLS ServerName to be used for Alternative Services

func WithAlternativeServices

func WithAlternativeServices(hosts []string) AlternativeServicesOptions

WithAlternativeServices preseed the cache with alternatives services

func WithLocalhostAllowed

func WithLocalhostAllowed() AlternativeServicesOptions

WithLocalhostAllowed allows to use alternative services if the destination host is localhost (disabled by default)

Jump to

Keyboard shortcuts

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