httputil

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTimeoutReader

func NewTimeoutReader(r io.Reader, ctrl *http.ResponseController, readTimeout time.Duration) io.Reader

func NewTimeoutResponseWriter

func NewTimeoutResponseWriter(w http.ResponseWriter, writeTimeout time.Duration) http.ResponseWriter

func RequestId

func RequestId(next http.Handler) http.Handler

Types

type LogEntry

type LogEntry struct {
	Logger *zap.Logger
	// contains filtered or unexported fields
}

func (*LogEntry) Panic

func (l *LogEntry) Panic(v interface{}, stack []byte)

func (*LogEntry) Write

func (l *LogEntry) Write(status int, bytes int, header http.Header, elapsed time.Duration, extra interface{})

type LogFormatter

type LogFormatter struct{ *zap.Logger }

func (LogFormatter) NewLogEntry

func (f LogFormatter) NewLogEntry(r *http.Request) middleware.LogEntry

type Server

type Server struct {
	Logger  *zap.Logger
	Addr    string
	Handler http.Handler

	TLS *ServerTLSConfig
}

func (*Server) Run

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

type ServerTLSConfig

type ServerTLSConfig struct {
	Storage       certmagic.Storage
	ACMEDirectory string
	ACMEEmail     string
	Addr          string
	DomainNames   []string
	CheckDomain   func(name string) error
}

Jump to

Keyboard shortcuts

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