{"modulePath":"github.com/TinyStac/tinystack","version":"v0.0.0-20221021101514-ca78c080174d","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package proxy\n\n## Types\n\n```go\ntype Proxy interface {\n\tUpdate(addresses []string)\n\tSetAPIServerPort(ctx context.Context, port int, isIPv6 bool) error\n\tSetSupervisorDefault(address string)\n\tIsSupervisorLBEnabled() bool\n\tSupervisorURL() string\n\tSupervisorAddresses() []string\n\tAPIServerURL() string\n\tIsAPIServerLBEnabled() bool\n}\n```\n\n```go\nfunc NewSupervisorProxy(ctx context.Context, lbEnabled bool, dataDir, supervisorURL string, lbServerPort int, isIPv6 bool) (Proxy, error)\n```\nNewSupervisorProxy 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.\n\n","path":"github.com/TinyStac/tinystack/pkg/agent/proxy","name":"proxy","synopsis":"","isRedistributable":true}
