endpoint

package
v0.0.0-...-0231498 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstrumentingMiddleware

func InstrumentingMiddleware(duration metrics.Histogram) kit.Middleware

InstrumentingMiddleware returns an endpoint middleware that records the duration of each invocation to the passed histogram. The middleware adds a single field: "success", which is "true" if no error is returned, and "false" otherwise.

func LoggingMiddleware

func LoggingMiddleware(logger kitlog.Logger) kit.Middleware

LoggingMiddleware returns an endpoint middleware that logs the duration of each invocation, and the resulting error, if any.

func MakeFindEndpoint

func MakeFindEndpoint(svc api.UserServer) kit.Endpoint

func MakeUpdateEndpoint

func MakeUpdateEndpoint(svc api.UserServer) kit.Endpoint

Types

type Endpoints

type Endpoints struct {
	FindEndpoint   kit.Endpoint
	UpdateEndpoint kit.Endpoint
}

Endpoints User endpoints

func New

func New(svc api.UserServer, mdw map[string][]kit.Middleware) Endpoints

func (Endpoints) Find

func (Endpoints) Update

Jump to

Keyboard shortcuts

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