Versions in this module Expand all Collapse all v0 v0.0.3 Dec 28, 2021 Changes in this version + const DefaultCacheMaxAgeSeconds v0.0.2 Nov 18, 2021 Changes in this version + const EndpointRoot + const StatusDefault404 + const StatusDefault500 + const StatusDefault5XX + func FileDirectoryPath(defaultFiles []string, requestPath string, httpDir http.Dir) (http.File, os.FileInfo, error) + func RequestPath(r *http.Request) string + func Runtime(cfg *ServerConfig, V RuntimeProgram) error + type EmptyProgram struct + func (v *EmptyProgram) Lock() + func (v *EmptyProgram) Refresh() + func (v *EmptyProgram) Unlock() + func (v *EmptyProgram) Values(req *http.Request) interface{} + type Endpoint struct + Handler http.Handler + Pattern string + type RootHandler struct + Config *ServerConfig + HTTPDir http.Dir + V RuntimeProgram + func NewRootHandler(cfg *ServerConfig, V RuntimeProgram) *RootHandler + func (rh *RootHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RuntimeProgram interface + Lock func() + Refresh func() + Unlock func() + Values func(request *http.Request) interface{} + type ServerConfig struct + BindAddress string + Content404 []byte + Content500 []byte + Content5XX []byte + DefaultIndexFiles []string + Endpoints []*Endpoint + InterpolateExtensions []string + LogVerbosity int + ServeDirectory string + UseDefaultRootHandler bool