endpoint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: MIT 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) endpoint.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 log.Logger) endpoint.Middleware

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

func MakeAddOverlayEndpoint

func MakeAddOverlayEndpoint(s capture.Service) endpoint.Endpoint

func MakeExtractEndpoint

func MakeExtractEndpoint(s capture.Service) endpoint.Endpoint

Types

type Set

type Set struct {
	ExtractEndpoint    endpoint.Endpoint
	AddOverlayEndpoint endpoint.Endpoint
}

func New

func New(svc capture.Service, logger log.Logger, duration metrics.Histogram) Set

Jump to

Keyboard shortcuts

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