http

package
v1.4.2-rc-1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeBodyContent

func EncodeBodyContent(content interface{}) (io.ReadCloser, error)

func Get

func Get(client client.HttpClient, url string, headers map[string]string, responseStruct interface{}, log *log.Entry, statusCode *int) (err error)

func WriteErrorResponse

func WriteErrorResponse(w http.ResponseWriter, r *http.Request, err error)

Types

type RetryLogger

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

RetryLogger This is a wrapper of logrus for `go-retryablehttp`

func NewRetryLogger

func NewRetryLogger(logger *log.Entry) *RetryLogger

func (*RetryLogger) Debug

func (l *RetryLogger) Debug(msg string, keysAndValues ...interface{})

Debug This redirects the Debug messages to Trace level as the library is displaying way too many messages

func (*RetryLogger) Error

func (l *RetryLogger) Error(msg string, keysAndValues ...interface{})

func (*RetryLogger) Info

func (l *RetryLogger) Info(msg string, keysAndValues ...interface{})

func (*RetryLogger) Warn

func (l *RetryLogger) Warn(msg string, keysAndValues ...interface{})

Jump to

Keyboard shortcuts

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