http

package
v1.215.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// StandardMux for HTTP.
	StandardMux = MuxKind("standard")

	// GatewayMux for HTTP.
	GatewayMux = MuxKind("gateway")
)

Variables

This section is empty.

Functions

func NewRuntimeServeMux added in v1.202.0

func NewRuntimeServeMux() *runtime.ServeMux

NewRuntimeServeMux for HTTP.

func NewStandardServeMux added in v1.202.0

func NewStandardServeMux() *http.ServeMux

NewServeMux for http.

Types

type Config added in v1.165.0

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

Config for HTTP.

type MuxKind added in v1.202.1

type MuxKind string

MuxKind for HTTP.

type RuntimeServeMux added in v1.202.0

type RuntimeServeMux struct {
	*runtime.ServeMux
}

RuntimeServeMux for HTTP.

func (*RuntimeServeMux) Handle added in v1.202.0

func (r *RuntimeServeMux) Handle(verb, pattern string, fn http.HandlerFunc) error

func (*RuntimeServeMux) Handler added in v1.202.0

func (r *RuntimeServeMux) Handler() http.Handler

type ServeMux added in v1.202.0

type ServeMux interface {
	// Handle a verb, pattern with the func.
	Handle(verb, pattern string, fn http.HandlerFunc) error

	// Handler from the mux.
	Handler() http.Handler
}

ServeMux for HTTP.

func NewServeMux added in v1.202.0

func NewServeMux(kind MuxKind, r *runtime.ServeMux, s *http.ServeMux) ServeMux

NewServeMux 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

type StandardServeMux added in v1.202.0

type StandardServeMux struct {
	*http.ServeMux
}

StandardServeMux for HTTP.

func (*StandardServeMux) Handle added in v1.202.0

func (s *StandardServeMux) Handle(verb, pattern string, fn http.HandlerFunc) error

func (*StandardServeMux) Handler added in v1.202.0

func (s *StandardServeMux) Handler() http.Handler

Jump to

Keyboard shortcuts

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