hello

package
v0.0.0-...-fb0c27c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeHealthRequest

func DecodeHealthRequest(_ context.Context, r *http.Request) (interface{}, error)

func DecodeHelloRequest

func DecodeHelloRequest(_ context.Context, r *http.Request) (interface{}, error)

func DecodeHelloResponse

func DecodeHelloResponse(_ context.Context, resp *http.Response) (interface{}, error)

func EncodeJSONRequest

func EncodeJSONRequest(_ context.Context, req *http.Request, request interface{}) error

func EncodeResponse

func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error

func MakeHealthEndpoint

func MakeHealthEndpoint(svc Service) endpoint.Endpoint

func MakeHelloEndpoint

func MakeHelloEndpoint(svc Service) endpoint.Endpoint

func Register

func Register(consulAddress string,
	consulPort string,
	advertiseAddress string,
	advertisePort string) (registar sd.Registrar)

Types

type HelloService

type HelloService struct {
}

func (HelloService) HealthCheck

func (HelloService) HealthCheck() bool

func (HelloService) SayHello

func (HelloService) SayHello(name string) string

type Service

type Service interface {
	HealthCheck() bool
	SayHello(name string) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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