http

package
v1.284.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transport added in v1.237.0

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

Transport for HTTP.

func WriteError added in v1.240.0

func WriteError(ctx context.Context, res http.ResponseWriter, err error, status int)

WriteError for http.

Types

type Config added in v1.165.0

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

Config for HTTP.

type Server added in v1.164.0

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

Server for HTTP.

func NewServer added in v1.164.0

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

NewServer for HTTP.

func (*Server) IsEnabled added in v1.166.2

func (s *Server) IsEnabled() bool

IsEnabled for server.

func (*Server) Serve added in v1.164.0

func (s *Server) Serve() error

Serve the underlying server.

func (*Server) Shutdown added in v1.164.0

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

Shutdown the underlying server.

func (*Server) String added in v1.165.0

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