Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidIP = errors.New("invalid ip address")
ErrInvalidIP indicates a given IP address is invalid
Functions ¶
func PushFiles ¶
func PushFiles(w http.ResponseWriter, files ...string) error
PushFiles takes a http.ResponseWriter and a variadic amount of file strings the function will iterate through each file and performs an HTTP/2 Push if HTTP/2 is supported AND if the files are valid. Otherwise, will return error
func RedirectHTTPS ¶
func RedirectHTTPS(httpsHost string) func(http.ResponseWriter, *http.Request)
RedirectHTTPS can redirect all http traffic to corresponding https addresses
Types ¶
type Server ¶
Server ...
func NewServer ¶
func NewServer(secure bool, ip string, port string, certFile string, keyFile string, rootCA string, hostname string, shutdownCode int, cmdEnable bool, r *mux.Router) (*Server, error)
NewServer ...
Click to show internal directories.
Click to hide internal directories.