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 MakeDivEndpoint

func MakeDivEndpoint(srv Service) endpoint.Endpoint

MakeDivEndpoint returns the response from our service "Div"

func NewHTTPServer

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

NewHTTPServer is a good little server

Types

type Endpoints

type Endpoints struct {
	DivEndpoint endpoint.Endpoint
}

Endpoints are exposed

func (Endpoints) Div

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

Div endpoint mapping

type Service

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

Service provides and interface for dividing integers

func NewDivService

func NewDivService() Service

NewDivService makes a new Service

Jump to

Keyboard shortcuts

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