tools

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ILoadBalancer

type ILoadBalancer interface {
	GetNextServer() string // Returns an address to the next available server
}

func NewLoadBalancer

func NewLoadBalancer(srvs []string) ILoadBalancer

Creates a new instance of load balancer

type ITunnel

type ITunnel interface {
	AllocateHost() (ITunnelHost, error)
}

func NewTunnel

func NewTunnel(name string, connCh chan<- net.Conn) ITunnel

Create a new tunnel

type ITunnelHost

type ITunnelHost interface {
	OpenTunnel(string, chan<- string)
	SubDomain() string
	FullURL() string
	MaxConnectionCount() int
	PortNumber() int
}

type LoadBalancer

type LoadBalancer struct {
	// contains filtered or unexported fields
}

func (*LoadBalancer) GetNextServer

func (lb *LoadBalancer) GetNextServer() string

Retrieve the next server

Jump to

Keyboard shortcuts

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