http

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoHTTPProbe

DoHTTPProbe checks if a POST request to the url succeeds. If the HTTP response code is successful (i.e. code == 200 or 201), it returns Success. If the HTTP response code is unsuccessful or HTTP communication fails, it returns Failure. This is exported because some other packages may want to do direct HTTP probes.

func New

New creates Prober that will skip TLS verification while probing.

func NewTestHTTPServer

func NewTestHTTPServer() *httptest.Server

NewTestHTTPServer mock http server

Types

type HTTPClientInterface

type HTTPClientInterface interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClientInterface is an interface for making HTTP requests, that returns a response and error.

Jump to

Keyboard shortcuts

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