transport

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MakeGenerateEndpoint

func MakeGenerateEndpoint(s service.Service) endpoint.Endpoint

MakeGenerateEndpoint constructs a Generate endpoint wrapping the service.

func NewGRPCServer

func NewGRPCServer(endpoints Set, logger log.Logger) qrcodev1.QRCodeAPIServer

NewGRPCServer makes a set of endpoints available as a gRPC AddServer.

Types

type Set

type Set struct {
	GenerateEndpoint endpoint.Endpoint
}

Set collects all of the endpoints that compose an QR Code service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.

func New

func New(svc service.Service, logger log.Logger) Set

New returns a Set that wraps the provided server, and wires in all of the expected endpoint middlewares via the various parameters.

Jump to

Keyboard shortcuts

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