reqid

package
v0.0.0-...-59fa258 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2016 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package reqid creates request IDs and stores them in Contexts.

Index

Constants

View Source
const Unknown = "unknown_req_id"

Variables

This section is empty.

Functions

func CoreIDFromContext

func CoreIDFromContext(ctx context.Context) string

CoreIDFromContext returns the Chain-Core-ID stored in ctx, or the empty string.

func FromContext

func FromContext(ctx context.Context) string

FromContext returns the request ID stored in ctx, or Unknown, if there is none.

func FromSubContext

func FromSubContext(ctx context.Context) string

FromSubContext returns the sub-request ID stored in ctx, or Unknown if there is none

func Handler

func Handler(handler http.Handler) http.Handler

func New

func New() string

New generates a random request ID.

func NewContext

func NewContext(ctx context.Context, reqid string) context.Context

NewContext returns a new Context that carries reqid.

func NewSubContext

func NewSubContext(ctx context.Context, reqid string) context.Context

NewSubContext returns a new Context that carries subreqid

Types

This section is empty.

Jump to

Keyboard shortcuts

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