server

package
v0.0.0-...-96afc83 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ListenAddr           string
	TLSListenAddr        string
	TLSOnly              bool
	TLS                  *TLSConfig
	Verbose              bool
	BackendFile          string
	CacheDir             string
	ProxyTarget          string
	CacheExpiration      time.Duration
	CacheCleanupInterval time.Duration
}

Config represents a server config

type Server

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

Server represents a server instance

func New

func New(c *Config) (*Server, error)

New creates a new server instance

func (*Server) ListenAndServe

func (s *Server) ListenAndServe()

ListenAndServe listens for new requests and serves them

type TLSConfig

type TLSConfig struct {
	KeyFile  string
	CertFile string
}

TLSConfig represents a TLS configuration

Jump to

Keyboard shortcuts

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