ex

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: BSD-2-Clause Imports: 7 Imported by: 4

Documentation

Overview

Package ex is a set of extensions and middleware for ln.

This package will (inevitably) have a lot of third-party dependencies and as such might be broken apart into other packages in the future.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Counter

func Counter(name string, value int) ln.Fer

Counter formats a value as a metrics counter.

func Gauge

func Gauge(name string, value int) ln.Fer

Gauge formats a value as a metrics gauge.

func HTTPLog

func HTTPLog(next http.Handler) http.Handler

HTTPLog automagically logs HTTP traffic.

func Measure

func Measure(name string, ts time.Time) ln.Fer

Measure formats a value as a metrics measure.

func NewGoEventLogger

func NewGoEventLogger(ev trace.EventLog) ln.Filter

NewGoEventLogger will log ln information to a given trace.EventLog instance.

func NewGoTraceLogger

func NewGoTraceLogger() ln.Filter

NewGoTraceLogger will log ln information to a golang.org/x/net/trace.Trace if it is present in the context of ln calls.

Types

This section is empty.

Jump to

Keyboard shortcuts

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