elasticsearch

package module
v0.0.0-...-b555116 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 8 Imported by: 0

README

elasticsearch

elasticsearch extensions

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsFromCtx

func FieldsFromCtx(ctx context.Context) []zap.Field

FieldsFromCtx write context meta data

func NewLogger

func NewLogger(hasReq, hasRes bool) estransport.Logger

Types

type Logger

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

func (*Logger) LogRoundTrip

func (l *Logger) LogRoundTrip(req *http.Request, res *http.Response, err error, start time.Time, dur time.Duration) error

func (*Logger) RequestBodyEnabled

func (l *Logger) RequestBodyEnabled() bool

RequestBodyEnabled makes the client pass a copy of request body to the logger.

func (*Logger) ResponseBodyEnabled

func (l *Logger) ResponseBodyEnabled() bool

ResponseBodyEnabled makes the client pass a copy of response body to the logger.

Jump to

Keyboard shortcuts

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