serv

package
v0.0.0-...-f0b40b8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeMulEndpoint

func MakeMulEndpoint(srv Service) endpoint.Endpoint

MakeMulEndpoint returns the response from our service "Mul"

func NewHTTPServer

func NewHTTPServer(ctx context.Context, endpoints Endpoints) http.Handler

NewHTTPServer is a good little server

Types

type Endpoints

type Endpoints struct {
	MulEndpoint endpoint.Endpoint
}

Endpoints are exposed

func (Endpoints) Mul

func (e Endpoints) Mul(ctx context.Context, a, b int) (int, error)

Mul endpoint mapping

type Service

type Service interface {
	Mul(ctx context.Context, a, b int) (int, error)
}

Service provides and interface for multiplying integers

func NewMulService

func NewMulService() Service

NewMulService makes a new Service

Jump to

Keyboard shortcuts

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