http

package
v0.0.0-...-05cadd0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listener

func Listener(port int) (net.Listener, error)

Listener returns net.Listener object

Types

type HeaderValue

type HeaderValue struct {
	Name  string
	Value string
	Type  string
}

HeaderValue defines HTTP header passed into fn

func ExtractHeaders

func ExtractHeaders(headersToPass []config.HeaderPass, headers http.Header) []HeaderValue

ExtractHeaders returns a slice of structs filled with target field names and values from HTTP headers along with optional argument types (int or string)

type Server

type Server interface {
	Run(cfg config.HTTP, log log.Logger)
	Shutdown()
	HandleFunc(pattern string, handler http.HandlerFunc)
	//
	Ready()
	NotReady()
}

Server implements basic Kube-dispatched HTTP server

func NewServer

func NewServer() Server

NewServer returns an HTTP server

Jump to

Keyboard shortcuts

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