gonet

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(hosts []string, handlers []Handler, port int) error

Serve starts a new TLS 1.3 server on the specified host addresses/names and handles each handler

Types

type Handler

type Handler struct {
	Func HandlerFunc
	Path string
}

func NewHandler

func NewHandler(p string, f HandlerFunc) Handler

NewHandler creates a handler object which forces a relationship between a handler and a path

type HandlerFunc

type HandlerFunc func(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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