server

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeoutShutdown time.Duration = 5 * time.Second

DefaultTimeoutShutdown - Default Timeout for shutting down a context.

Variables

This section is empty.

Functions

func InitInternals added in v1.3.1

func InitInternals() *http.Server

InitInternals - Generates the internals endpoints (not exposed on public ports :80 :443).

func InitServer

func InitServer(domain string, domainConfig config.Configuration) *http.Server

InitServer - Generates the http.Server configuration.

func Run

func Run(appVersion string, configFile string)

Run - Starts the GoProxyCache servers' listeners.

Types

type Server added in v1.3.1

type Server struct {
	Domain  string
	HttpSrv *http.Server
}

Server - Contains the core info about an HTTP server.

type Servers

type Servers struct {
	HTTP  map[string]*Server
	HTTPS map[string]*Server
}

Servers - Contains the HTTP/HTTPS servers.

func (*Servers) AttachPlain

func (s *Servers) AttachPlain(domain string, port string, server *http.Server)

AttachPlain - Adds a new HTTP server in the listener container. NOTE: There will be only ONE server listening on a port.

This means the last processed will override all the previous shared
settings. THIS COULD LEAD TO CONFLICTS WHEN SHARING THE SAME PORT.

func (*Servers) AttachSecure

func (s *Servers) AttachSecure(domain string, port string, server *http.Server)

AttachSecure - Adds a new HTTPS server in the listener container. NOTE: There will be only ONE server listening on a port.

This means the last processed will override all the previous shared
settings. THIS COULD LEAD TO CONFLICTS WHEN SHARING THE SAME PORT.

func (*Servers) InitServers

func (s *Servers) InitServers(domain string, domainConfig config.Configuration)

InitServers - Returns a http.Server configuration for HTTP and HTTPS.

func (*Servers) StartDomainServer

func (s *Servers) StartDomainServer(domain string, scheme string)

StartDomainServer - Configures and start listening for a particular domain.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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