domain

package
v0.0.0-...-a8f6685 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BackendProvider = NewBackend
View Source
var BridgeProvider = NewBridge
View Source
var BridgesProvider = NewBridges
View Source
var Dialer = net.Dial

Functions

func BroadcastBool

func BroadcastBool(in <-chan bool, outs []chan<- bool)

Types

type Backend

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

func NewBackend

func NewBackend(
	name string,
	host string,
	port uint,
	statusPort uint,
	statusEndpoint string,
	logger lager.Logger) *Backend

func NewBackends

func NewBackends(backendConfigs []config.Backend, logger lager.Logger) (backends []*Backend)

func (*Backend) AsJSON

func (b *Backend) AsJSON() BackendJSON

func (*Backend) Bridge

func (b *Backend) Bridge(clientConn net.Conn) error

func (*Backend) HealthcheckUrl

func (b *Backend) HealthcheckUrl() string

func (*Backend) Healthy

func (b *Backend) Healthy() bool

func (*Backend) SetHealthy

func (b *Backend) SetHealthy()

func (*Backend) SetUnhealthy

func (b *Backend) SetUnhealthy()

func (*Backend) SeverConnections

func (b *Backend) SeverConnections()

type BackendJSON

type BackendJSON struct {
	Host                string `json:"host"`
	Port                uint   `json:"port"`
	StatusPort          uint   `json:"status_port"`
	Healthy             bool   `json:"healthy"`
	Name                string `json:"name"`
	CurrentSessionCount uint   `json:"currentSessionCount"`
}

type Bridge

type Bridge interface {
	Connect()
	Close()
}

func NewBridge

func NewBridge(client, backend net.Conn, logger lager.Logger) Bridge

type Bridges

type Bridges interface {
	Create(clientConn, backendConn net.Conn) Bridge
	Remove(bridge Bridge) error
	RemoveAndCloseAll()
	Size() uint
	Contains(bridge Bridge) bool
}

func NewBridges

func NewBridges(logger lager.Logger) Bridges

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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