http

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExcludeFromLogging = regexp.MustCompile(`\/(ready|live|metrics)$`)

Functions

func InitHTTPServer

func InitHTTPServer(opts *opts.AppHTTP) (
	func(context.Context) error, <-chan any, error,
)

Returns a shutdown func and a done channel if the server aborts abnormally. Returns error on failure to start

Types

type LoggingResponseWriter

type LoggingResponseWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func (*LoggingResponseWriter) Flush

func (w *LoggingResponseWriter) Flush()

Implement Flush to support the http.Flusher interface

func (*LoggingResponseWriter) Write

func (w *LoggingResponseWriter) Write(b []byte) (int, error)

func (*LoggingResponseWriter) WriteHeader

func (w *LoggingResponseWriter) WriteHeader(code int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳