server

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

func WithHandler

func WithHandler(handler http.Handler) Option

func WithReadTimeout

func WithReadTimeout(timeout time.Duration) Option

func WithWriteTimeout

func WithWriteTimeout(timeout time.Duration) Option

type Server

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

func New

func New(logger *slog.Logger, addr string, opts ...Option) *Server

func (*Server) GracefulShutdown

func (s *Server) GracefulShutdown()

func (*Server) Start

func (s *Server) Start()

func (*Server) StartAndWait

func (s *Server) StartAndWait()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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