epsagonhttp

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const AMAZON_REQUEST_ID = "x-amzn-requestid"
View Source
const API_GATEWAY_RESOURCE_TYPE = "api_gateway"
View Source
const APPSYNC_API_SUBDOMAIN = ".appsync-api."
View Source
const AWS_SERVICE_KEY = "aws.service"
View Source
const EPSAGON_DOMAIN = "epsagon.com"
View Source
const EPSAGON_REQUEST_TRACEID_METADATA_KEY = "request_trace_id"
View Source
const EPSAGON_TRACEID_HEADER_KEY = "epsagon-trace-id"
View Source
const EPSAGON_TRACEID_METADATA_KEY = "http_trace_id"

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientWrapper

type ClientWrapper struct {
	http.Client

	// MetadataOnly flag overriding the configuration
	MetadataOnly bool
	// contains filtered or unexported fields
}

ClientWrapper is Epsagon's wrapper for http.Client

func Wrap

func Wrap(c http.Client, args ...context.Context) ClientWrapper

Wrap wraps an http.Client to Epsagon's ClientWrapper

func (*ClientWrapper) Do

func (c *ClientWrapper) Do(req *http.Request) (resp *http.Response, err error)

Do wraps http.Client's Do

func (*ClientWrapper) Get

func (c *ClientWrapper) Get(rawUrl string) (resp *http.Response, err error)

Get wraps http.Client.Get

func (*ClientWrapper) Head

func (c *ClientWrapper) Head(rawUrl string) (resp *http.Response, err error)

Head wraps http.Client.Head

func (*ClientWrapper) Post

func (c *ClientWrapper) Post(
	rawUrl string, contentType string, body io.Reader) (resp *http.Response, err error)

Post wraps http.Client.Post

func (*ClientWrapper) PostForm

func (c *ClientWrapper) PostForm(
	rawUrl string, data url.Values) (resp *http.Response, err error)

PostForm wraps http.Client.PostForm

type ValidationFunction added in v1.5.0

type ValidationFunction func(string, string) bool

Jump to

Keyboard shortcuts

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