http

package
v0.0.0-...-037b315 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 11 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(s *Server)

func Address

func Address(addr string) Option

func Chain

func Chain(chain chain.Chain) Option

func Handler

func Handler(handler http.Handler) Option

func Listen

func Listen(lis net.Listener) Option

func Log

func Log(log log.Logger) Option

func Middlewares

func Middlewares(mids ...chain.Middleware) Option

func Network

func Network(network string) Option

type Server

type Server struct {
	*http.Server
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (s *Server, err error)

func (*Server) Endpoint

func (s *Server) Endpoint() (*url.URL, error)

func (*Server) Name

func (s *Server) Name() string

func (*Server) Start

func (s *Server) Start(ctx context.Context) (err error)

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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