endpoint

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 1 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	// NewEndpoint returns an endpoint wrapped with preconfigured middleware.
	// It also accepts an operation name for per operation middleware (eg. logging or tracing middleware).
	NewEndpoint(name string, e endpoint.Endpoint) endpoint.Endpoint
}

Factory returns an endpoint wrapped with preconfigured middleware.

func NewFactory

func NewFactory(middlewareFactories ...MiddlewareFactory) Factory

NewFactory returns a new Factory.

type MiddlewareFactory

type MiddlewareFactory func(name string) endpoint.Middleware

MiddlewareFactory creates a middleware per operation.

func Middleware

func Middleware(middleware endpoint.Middleware) MiddlewareFactory

Middleware wraps singleton middleware and wraps them in a MiddlewareFactory.

Jump to

Keyboard shortcuts

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