server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

func NewHTTPServer

func NewHTTPServer(port int, opts ...Option) *HTTPServer

func (*HTTPServer) Delete

func (s *HTTPServer) Delete(pattern string, handlerFn http.HandlerFunc)

func (*HTTPServer) Get

func (s *HTTPServer) Get(pattern string, handlerFn http.HandlerFunc)

func (*HTTPServer) Handle

func (s *HTTPServer) Handle(pattern string, handler http.Handler)

func (*HTTPServer) Post

func (s *HTTPServer) Post(pattern string, handlerFn http.HandlerFunc)

func (*HTTPServer) Put

func (s *HTTPServer) Put(pattern string, handlerFn http.HandlerFunc)

func (*HTTPServer) Serve

func (s *HTTPServer) Serve(ctx context.Context) error

type Option

type Option func(*HTTPServer)

func WithGracePeriod

func WithGracePeriod(d time.Duration) Option

Jump to

Keyboard shortcuts

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