listeners

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPSConfiguration

type HTTPSConfiguration struct {
	MaximumConnections uint64              `gluamapper:"maximum_connections" json:"maximum_connections"`
	Listen             []string            `gluamapper:"listen" json:"listen"`
	Certificate        string              `gluamapper:"certificate" json:"certificate"`
	PrivateKey         string              `gluamapper:"private_key" json:"private_key"`
	Allow              map[string][]string `gluamapper:"allow" json:"allow"`
}

HTTPSConfiguration - configuration file data for HTTPS setup

type Listener

type Listener interface {
	Serve() error
}

func NewHTTPS

func NewHTTPS(
	configuration *HTTPSConfiguration,
	log *logger.L,
	tlsConfig *tls.Config,
	hdlr handler.Handler,
) (Listener, error)

func NewRPC

func NewRPC(
	configuration *RPCConfiguration,
	log *logger.L,
	count *counter.Counter,
	server *rpc.Server,
	ann announce.Announce,
	tlsConfig *tls.Config,
	certificateFingerprint [32]byte,
) (Listener, error)

type RPCConfiguration

type RPCConfiguration struct {
	MaximumConnections uint64   `gluamapper:"maximum_connections" json:"maximum_connections"`
	Bandwidth          float64  `gluamapper:"bandwidth" json:"bandwidth"`
	Listen             []string `gluamapper:"listen" json:"listen"`
	Certificate        string   `gluamapper:"certificate" json:"certificate"`
	PrivateKey         string   `gluamapper:"private_key" json:"private_key"`
	Announce           []string `gluamapper:"announce" json:"announce"`
}

RPCConfiguration - configuration file data for RPC setup

Jump to

Keyboard shortcuts

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