relay

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadVersion   = errors.New("relay: bad version")
	ErrUnknownCmd   = errors.New("relay: unknown command")
	ErrUnauthorized = errors.New("relay: unauthorized")
	ErrRateLimit    = errors.New("relay: rate limiting exceeded")
)

Functions

func NewHandler

func NewHandler(opts ...handler.Option) handler.Handler

Types

type Connector

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

func NewConnector

func NewConnector(id relay.ConnectorID, s *mux.Session) *Connector

func (*Connector) ID

func (c *Connector) ID() relay.ConnectorID

func (*Connector) Session

func (c *Connector) Session() *mux.Session

type ConnectorPool

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

func NewConnectorPool

func NewConnectorPool() *ConnectorPool

func (*ConnectorPool) Add

func (p *ConnectorPool) Add(tid relay.TunnelID, c *Connector)

func (*ConnectorPool) Get

func (p *ConnectorPool) Get(network string, tid relay.TunnelID) *Connector

type Tunnel

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

func NewTunnel

func NewTunnel(id relay.TunnelID) *Tunnel

func (*Tunnel) AddConnector

func (t *Tunnel) AddConnector(c *Connector)

func (*Tunnel) GetConnector

func (t *Tunnel) GetConnector(network string) *Connector

func (*Tunnel) ID

func (t *Tunnel) ID() relay.TunnelID

Jump to

Keyboard shortcuts

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