package
1.0.0
Repository: https://github.com/apundir/wsbalancer.git
Documentation: pkg.go.dev

# Functions

NewConnectionDeclinedError create new error with provided code.
NewSystemUnavailableError create new error without code.
NewSystemUnavailableErrorWithCode create new error with provided code.

# Constants

ForwardedForHeader forwarded for header , i.e.
RemoteConnectionAbnormalClosure indicate abnormal closure of the remote end.
RemoteConnectionNormalClosure indicates a proper, i.e.
ResultFailed indicates Requested operation failure.
ResultNoActionReqd indicates that Requested operation didn't need any action.
ResultSuccess indicates successful completion of requested admin action.
SubprotocolHeader Header name for websocket subprotocol, i.e.

# Structs

BackendDialContext - an encapsulated context type which contains all the information using which a backend connection shall be made to one of the available backend.
ConnectionDeclinedError indicates that remote system is available but when attempted to connect, the remote system purposefully declined the connection, this could be due to various reasons like authentication failure etc.
ProxySession is an established live session with an incoming frontend connection and respective backend connection.
RemoteSystemError An error thrown by balancer indicating remote backend system is not able to accept a new connection.
SystemUnavailableError indicate backend system unavailability.
WsMessage - message being exchanged b/w frontend and backend connections.

# Interfaces

BackendAdministrator provides administrative capabilities over available backends.
BackendConnection is the client connection created from one of the backend.
BackendDialer is used for requesting a fresh connection to any of the available backend servers.
FrontendConnection is the client connection obtained from Frontend server against an incoming request.
Identifier - provides a unique id for the object that can be used for general purpose admin management operations, reporting and logging.
MessageValve - a valve acts as a filter through which the message is passed before it is sent to backend server and after it's received from backend server.
SessionListener is notified on creation and termination of every proxy sessions.
StartCloseIdentifier - combination of Starter, Closer and Identifier.
StartCloser - can be started as well as closed for reading/writing.
Starter - can start reading and writing loops.
ValveProvider - An interface that can be used to add 0 or more MessageValve for every new session.