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 MakeSubEndpoint

func MakeSubEndpoint(srv Service) endpoint.Endpoint

MakeSubEndpoint returns the response from our service "Sub"

func NewHTTPServer

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

NewHTTPServer is a good little server

Types

type Endpoints

type Endpoints struct {
	SubEndpoint endpoint.Endpoint
}

Endpoints are exposed

func (Endpoints) Sub

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

Sub endpoint mapping

type Service

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

Service provides and interface for subtracting integers

func NewSubService

func NewSubService() Service

NewSubService makes a new Service

Jump to

Keyboard shortcuts

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