Documentation
¶
Index ¶
- func New(cfg *config.Config, tlsConfig *tls.Config, validator auth.Validator, ...) *hubImpl
- type AttestationMetadata
- type Backend
- func (b *Backend) AddClient(clientConn net.Conn, clientID uuid.UUID, hostname string, isTLS bool) error
- func (b *Backend) AddOutboundClient(conn net.Conn, clientID uuid.UUID) error
- func (b *Backend) Close()
- func (b *Backend) ID() string
- func (b *Backend) RemoveClient(clientID uuid.UUID)
- func (b *Backend) SendControlMessage(msg protocol.ControlMessage) error
- func (b *Backend) SendData(clientID uuid.UUID, data []byte) error
- func (b *Backend) StartPumps()
- type LoadBalancerPool
- type UDPRoutePolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttestationMetadata ¶
type AttestationMetadata struct {
Hostnames []string
TCPPorts []int
UDPRoutes []UDPRoutePolicy
Weight int
ReauthInterval time.Duration
ReauthGrace time.Duration
MaintenanceCap time.Duration
HasMaintenanceCap bool
AuthorizerStatusURI string
PolicyVersion string
OutboundAllowed bool
AllowedOutboundPorts []int
}
AttestationMetadata captures the policy directives extracted from the attested token that Nexus must enforce for a backend connection.
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend represents a single, authenticated WebSocket connection from a backend service.
func NewBackend ¶
func NewBackend(conn *websocket.Conn, meta *AttestationMetadata, cfg *config.Config, validator auth.Validator, httpClient *http.Client) *Backend
NewBackend creates a new Backend instance.
func (*Backend) AddOutboundClient ¶ added in v0.3.1
AddOutboundClient stores a proxy-dialed outbound connection in the clients map. Unlike AddClient, it does not send EventConnect (the backend initiated the request and already knows about the connection).
func (*Backend) RemoveClient ¶
func (*Backend) SendControlMessage ¶
func (b *Backend) SendControlMessage(msg protocol.ControlMessage) error
func (*Backend) StartPumps ¶
func (b *Backend) StartPumps()
type LoadBalancerPool ¶
type LoadBalancerPool struct {
// contains filtered or unexported fields
}
LoadBalancerPool manages a collection of backend instances for a single hostname.
func NewLoadBalancerPool ¶
func NewLoadBalancerPool() *LoadBalancerPool
NewLoadBalancerPool creates a new, empty load balancer pool.
func (*LoadBalancerPool) AddBackend ¶
func (p *LoadBalancerPool) AddBackend(b *Backend)
func (*LoadBalancerPool) HasBackends ¶
func (p *LoadBalancerPool) HasBackends() bool
HasBackends returns true if there are one or more backends in the pool.
func (*LoadBalancerPool) RemoveBackend ¶
func (p *LoadBalancerPool) RemoveBackend(b *Backend)