middleware

package
v0.0.0-...-58d7e0c Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstrumentingMiddleware

type InstrumentingMiddleware struct {
	RequestCount   metrics.Counter
	RequestLatency metrics.Histogram
	Next           service.Greeter
}

func (InstrumentingMiddleware) Expensive

func (mw InstrumentingMiddleware) Expensive(ctx context.Context, connectionString, username, password string) (n string, err error)

func (InstrumentingMiddleware) Greet

func (mw InstrumentingMiddleware) Greet(ctx context.Context, greeting string) (output string, err error)

type LoggingMiddleware

type LoggingMiddleware struct {
	Logger *log.Logger
	Next   service.Greeter
}

func (LoggingMiddleware) Expensive

func (mw LoggingMiddleware) Expensive(ctx context.Context, connectionString, username, password string) (n string, err error)

func (LoggingMiddleware) Greet

func (mw LoggingMiddleware) Greet(ctx context.Context, greeting string) (output string, err error)

type LoggingMiddlewareGRPC

type LoggingMiddlewareGRPC struct {
	Logger *log.Logger
	Next   service.GreeterGRPC
}

func (LoggingMiddlewareGRPC) GreetGRPC

Jump to

Keyboard shortcuts

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