server

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 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 New

func New(addr string, opts ...Option) (*HTTPServer, error)

func (*HTTPServer) ListenAddr

func (s *HTTPServer) ListenAddr() net.Addr

func (*HTTPServer) ListenAndServe

func (s *HTTPServer) ListenAndServe() error

func (*HTTPServer) Stop

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

type Option

type Option func(*HTTPServer) error

func WithHandler

func WithHandler(handler http.Handler) Option

func WithReadTimeout

func WithReadTimeout(timeout time.Duration) Option

func WithReadySignal

func WithReadySignal(cb func(net.Addr)) Option

func WithShutdownTimeout

func WithShutdownTimeout(timeout time.Duration) Option

func WithWriteTimeout

func WithWriteTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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