Documentation ¶
Overview ¶
Copyright 2023 The Go SSI Framework Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHandlers ¶
func WithHandlers(handler http.Handler) func(*HttpServer)
WithHandlers sets the engin to be used by the webserver
func WithPort ¶
func WithPort(port string) func(*HttpServer)
WithPort sets the option of the serving port of the webserver
func WithVerbose ¶
func WithVerbose(verbose bool) func(*HttpServer)
WithVerbose sets the verbosity of the webserver
Types ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
Server options for the http server
func DefaultOptions ¶
func DefaultOptions() *HttpServer
DefaultOptions sets the default options of the http server
func NewHttpServer ¶
func NewHttpServer(options ...HttpServerOption) *HttpServer
NewHttpServer initializes the http server
type HttpServerContext ¶
type HttpServerContext string
const VerboseHttpServer HttpServerContext = "httpserververbose"
type HttpServerOption ¶
type HttpServerOption func(*HttpServer)
func WithHost ¶
func WithHost(hostName string) HttpServerOption
WithHost sets the option of the serving hostname of the webserver
type StatusRecorder ¶
type StatusRecorder struct { http.ResponseWriter Status int Start time.Time Method string Address string Path string // contains filtered or unexported fields }
func (*StatusRecorder) WriteHeader ¶
func (r *StatusRecorder) WriteHeader(status int)
Click to show internal directories.
Click to hide internal directories.