httpquery

package
v0.0.0-...-58693dd Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpQuery

type HttpQuery struct {
	// contains filtered or unexported fields
}

func New

func New(host url.URL, opt ...Option) (HttpQuery, error)

func (HttpQuery) Client

func (h HttpQuery) Client() *http.Client

Returns http.Client

func (HttpQuery) NewHttpRequest

func (h HttpQuery) NewHttpRequest(ctx context.Context, q prombench.Query) (*http.Request, error)

type Option

type Option func(*HttpQuery) error

Option controls the configuration of a Matcher.

func WithClient

func WithClient(c *http.Client) Option

WithClient sets the http.Client that the worker should use for requests. If not passed to NewHttpQuery, http.DefaultClient will be used.

func WithHeaders

func WithHeaders(headers http.Header) Option

WithHeaders adds additional headers to http.Request.

Jump to

Keyboard shortcuts

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