header

package
Version: v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RootPrefix is the prefix for
	// Root attribute in X-Amzn-Trace-Id.
	RootPrefix = "Root="

	// ParentPrefix is the prefix for
	// Parent attribute in X-Amzn-Trace-Id.
	ParentPrefix = "Parent="

	// SampledPrefix is the prefix for
	// Sampled attribute in X-Amzn-Trace-Id.
	SampledPrefix = "Sampled="

	// SelfPrefix is the prefix for
	// Self attribute in X-Amzn-Trace-Id.
	SelfPrefix = "Self="
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	TraceID          string
	ParentID         string
	SamplingDecision SamplingDecision

	AdditionalData map[string]string
}

Header is the value of X-Amzn-Trace-Id.

func FromString

func FromString(s string) *Header

FromString gets individual value for each item in Header struct.

func (Header) String

func (h Header) String() string

String returns a string representation for header.

type SamplingDecision

type SamplingDecision string

SamplingDecision is a string representation of whether or not the current segment has been sampled.

const (
	// Sampled indicates the current segment has been
	// sampled and will be sent to the X-Ray daemon.
	Sampled SamplingDecision = "Sampled=1"

	// NotSampled indicates the current segment has
	// not been sampled.
	NotSampled SamplingDecision = "Sampled=0"

	// Requested indicates sampling decision will be
	// made by the downstream service and propagated
	// back upstream in the response.
	Requested SamplingDecision = "Sampled=?"

	// Unknown indicates no sampling decision will be made.
	Unknown SamplingDecision = ""
)

Source Files

Jump to

Keyboard shortcuts

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