http

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package http defines the HTTP client used to interact with the Snyk Code API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

func NewHTTPClient

func NewHTTPClient(
	httpClientFactory HTTPClientFactory,
	options ...OptionFunc,
) HTTPClient

type HTTPClientFactory added in v1.4.4

type HTTPClientFactory func() *http.Client

type OptionFunc added in v1.4.2

type OptionFunc func(*httpClient)

func WithErrorReporter added in v1.4.2

func WithErrorReporter(errorReporter observability.ErrorReporter) OptionFunc

func WithInstrumentor added in v1.4.2

func WithInstrumentor(instrumentor observability.Instrumentor) OptionFunc

func WithLogger added in v1.4.2

func WithLogger(logger *zerolog.Logger) OptionFunc

func WithRetryCount added in v1.4.2

func WithRetryCount(retryCount int) OptionFunc

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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