http

package
v0.0.0-...-71e6e05 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPortOpenWithRetry

func IsPortOpenWithRetry(host string, connectionTimeout time.Duration, maxRetries int) error

IsPortOpen returns true if the port is open, false otherwise returns false if the timeout elapses before a connection is established

Types

type HttpRequestHandler

type HttpRequestHandler interface {
	httppb.HttpServer
	HandleRequest(request *fasthttp.Request) (*fasthttp.Response, error)
	WorkerCount() int
}

type HttpServer

type HttpServer struct {
	Output chan error
	// contains filtered or unexported fields
}

func New

func New() *HttpServer

func (*HttpServer) HandleRequest

func (srv *HttpServer) HandleRequest(request *fasthttp.Request) (*fasthttp.Response, error)

HandleRequest forwards proxy request to the underlying HTTP server

func (*HttpServer) Proxy

func (h *HttpServer) Proxy(stream httppb.Http_ProxyServer) error

func (*HttpServer) WorkerCount

func (h *HttpServer) WorkerCount() int

Jump to

Keyboard shortcuts

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