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 MakeAddEndpoint

func MakeAddEndpoint(srv Service) endpoint.Endpoint

MakeAddEndpoint returns the response from our service "Add"

func NewHTTPServer

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

NewHTTPServer is a good little server

Types

type Endpoints

type Endpoints struct {
	AddEndpoint endpoint.Endpoint
}

Endpoints are exposed

func (Endpoints) Add

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

Add endpoint mapping

type Service

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

Service provides and interface for adding integers

func NewAddService

func NewAddService() Service

NewAddService makes a new Service

Jump to

Keyboard shortcuts

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