server

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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