Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HybridListener ¶
HybridListener inspects the first bytes of the connection to determine whether to serve unencrypted HTTP or TLS. This allows using the same TCP port for both, which is convenient to reduce the configuration burden on the user. Source: https://github.com/foreverzmy/http-s-listen-same-port/
type Server ¶
Server is a wrapper around http.Server with some custom behavior.
func New ¶
New returns a new web Server instance. It creates a self-signed certificate for TLS connections over which store data will be transferred.
func (*Server) ListenAndServe ¶
ListenAndServe is a replacement of http.ListenAndServe to ensure we set the correct server address to be used in URLs, templates, etc. This is needed when starting the server with address ':0'.