proxy

package
v0.0.0-...-ca78c08 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy interface {
	Update(addresses []string)
	SetAPIServerPort(ctx context.Context, port int, isIPv6 bool) error
	SetSupervisorDefault(address string)
	IsSupervisorLBEnabled() bool
	SupervisorURL() string
	SupervisorAddresses() []string
	APIServerURL() string
	IsAPIServerLBEnabled() bool
}

func NewSupervisorProxy

func NewSupervisorProxy(ctx context.Context, lbEnabled bool, dataDir, supervisorURL string, lbServerPort int, isIPv6 bool) (Proxy, error)

NewSupervisorProxy sets up a new proxy for retrieving supervisor and apiserver addresses. If lbEnabled is true, a load-balancer is started on the requested port to connect to the supervisor address, and the address of this local load-balancer is returned instead of the actual supervisor and apiserver addresses. NOTE: This is a proxy in the API sense - it returns either actual server URLs, or the URL of the local load-balancer. It is not actually responsible for proxying requests at the network level; this is handled by the load-balancers that the proxy optionally steers connections towards.

Jump to

Keyboard shortcuts

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