timer

package
v0.0.0-...-c1a3bfb Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package timer adds HTTP request and response timing information to a context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timer

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

Timer collects request and response timing information

func FromContext

func FromContext(ctx context.Context) *Timer

FromContext creates a new context with the timer included

func (*Timer) NewContext

func (t *Timer) NewContext(ctx context.Context) context.Context

NewContext creates a new context with the timer included

func (*Timer) RequestHeaders

func (t *Timer) RequestHeaders()

RequestHeaders sets the time at which request headers were received

func (*Timer) ResponseDone

func (t *Timer) ResponseDone()

ResponseDone sets the time at which request headers were received

func (*Timer) ResponseHeaders

func (t *Timer) ResponseHeaders()

ResponseHeaders sets the time at which request headers were received

func (Timer) String

func (t Timer) String() string

Jump to

Keyboard shortcuts

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