Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶ added in v1.21.9
type Proxy interface { Update(addresses []string) SetAPIServerPort(ctx context.Context, port int) error SupervisorURL() string SupervisorAddresses() []string APIServerURL() string IsAPIServerLBEnabled() bool }
func NewSupervisorProxy ¶ added in v1.21.9
func NewSupervisorProxy(ctx context.Context, lbEnabled bool, dataDir, supervisorURL string, lbServerPort int) (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.
Click to show internal directories.
Click to hide internal directories.