mid_go

package module
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogging

func NewLogging()

func XRayMiddleware

func XRayMiddleware(sn xray.SegmentNamer) gin.HandlerFunc

Types

type LogFormat

type LogFormat struct {
	TimestampFormat string
}

func (LogFormat) Format

func (f LogFormat) Format(entry *logrus.Entry) ([]byte, error)

type LoggingRoundTripper

type LoggingRoundTripper struct {
	R   http.RoundTripper
	Seg *xray.Segment
}

LoggingRoundTripper This type implements the http.RoundTripper interface

func (LoggingRoundTripper) RoundTrip

func (lrt LoggingRoundTripper) RoundTrip(req *http.Request) (res *http.Response, e error)

type TransactionContext

type TransactionContext struct {
	LogContext *logrus.Entry
}

func NewTransactionContext

func NewTransactionContext(traceId string) *TransactionContext

Jump to

Keyboard shortcuts

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