server

package
v0.0.0-...-237f4c2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DEFAULT_HEADER_READ_TIMEOUT time.Duration = 60 * time.Second
	DEFAULT_READ_TIMEOUT        time.Duration = 600 * time.Second
	DEFAULT_WRITE_TIMEOUT       time.Duration = 600 * time.Second
	DEFAULT_IDLE_TIMEOUT        time.Duration = 600 * time.Second
)
View Source
var DEFAULT_ROOT_PATH_CALLBACK = func(w http.ResponseWriter, req *http.Request) {
	w.Header().Add("Strict-Transport-Security", "max-age=63072000; includeSubDomains")
	w.Header().Set("Content-Type", "text/plain")
	w.Write([]byte("Welcome to the rest server\n"))
}

Functions

func New

func New(logger log.Logger) common.RestServer

func NewHandleFunc

func NewHandleFunc(handleFunc TLSHandleFunc, logger log.Logger) common.RestServer

Types

type TLSHandleFunc

type TLSHandleFunc func(*tls.Conn, common.RestServer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL