http

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Protocols

func Protocols() *http.Protocols

Protocols returns all the protocols supported.

func ServerError

func ServerError(err error) error

ServerError returns nil if the err http.ErrServerClosed.

func Transport

func Transport(cfg *tls.Config) *http.Transport

Transport for HTTP.

Types

type Config

type Config struct {
	TLS     *tls.Config
	Address string
}

Config for HTTP.

type Server

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

Server for HTTP.

func NewServer

func NewServer(server *http.Server, cfg *Config) (*Server, error)

NewServer for HTTP.

func (*Server) Serve

func (s *Server) Serve() error

Serve the underlying server.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown the underlying server.

func (*Server) String

func (s *Server) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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