relay

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MonitorPath = "/__relay__up__/"

Functions

This section is empty.

Types

type Options added in v0.3.0

type Options struct {
	Service *ServiceOptions
	Relay   *traffic.RelayOptions
}

func ReadOptions added in v0.3.0

func ReadOptions(configFile *config.File) (*Options, error)

type Service

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

Service implements the relay service, exposing both the traffic handler and the monitoring page.

func NewService

func NewService(relayConfig *traffic.RelayOptions, trafficPlugins []traffic.Plugin) *Service

func (*Service) Address

func (service *Service) Address() string

func (*Service) Close

func (service *Service) Close() error

func (*Service) HttpUrl

func (service *Service) HttpUrl() string

func (*Service) Port

func (service *Service) Port() int

func (*Service) Start

func (service *Service) Start(host string, port int) error

func (*Service) WsUrl

func (service *Service) WsUrl() string

type ServiceOptions added in v0.3.0

type ServiceOptions struct {
	Port int // The port that the relay service should listen on.
}

ServiceOptions contains configuration options for the relay network service.

See also traffic.RelayOptions, which provides options for the actual relay functionality.

func NewDefaultServiceOptions added in v0.3.0

func NewDefaultServiceOptions() *ServiceOptions

type TcpKeepAliveListener

type TcpKeepAliveListener struct {
	*net.TCPListener
}

func (TcpKeepAliveListener) Accept

func (listener TcpKeepAliveListener) Accept() (net.Conn, error)

Jump to

Keyboard shortcuts

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