logger

package
v0.0.0-...-fc8bcac Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback (func(request Request) (interface{}, error))

Callback ...

type ILogger

type ILogger interface {
	Instrumentation(
		method string,
		action string,
		f func(ctx context.Context, request interface{}) (interface{}, error),
	) func(ctx context.Context, request interface{}) (interface{}, error)
	Log(method string, action string, f func(ctx context.Context, request interface{}) (interface{}, error)) func(ctx context.Context, request interface{}) (interface{}, error)
}

ILogger ...

type Logger

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

Logger ...

func New

func New(counter metrics.Counter, latency metrics.Histogram, logger log.Logger) Logger

New create gokit layer Logger

func (Logger) Instrumentation

func (m Logger) Instrumentation(
	method string,
	action string,
	f func(ctx context.Context, request interface{}) (interface{}, error),
) func(ctx context.Context, request interface{}) (interface{}, error)

Instrumentation ...

func (Logger) Log

func (m Logger) Log(
	method string,
	action string,
	f func(ctx context.Context, request interface{}) (interface{}, error),
) func(ctx context.Context, request interface{}) (interface{}, error)

Log ...

type Request

type Request struct {
	Ctx    context.Context
	Method string
	Action string
	Origin string
	Params interface{}
}

Request ...

Jump to

Keyboard shortcuts

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