Documentation ¶
Index ¶
- func DecodeHealthRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeHelloRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeHelloResponse(_ context.Context, resp *http.Response) (interface{}, error)
- func EncodeJSONRequest(_ context.Context, req *http.Request, request interface{}) error
- func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
- func MakeHealthEndpoint(svc Service) endpoint.Endpoint
- func MakeHelloEndpoint(svc Service) endpoint.Endpoint
- func Register(consulAddress string, consulPort string, advertiseAddress string, ...) (registar sd.Registrar)
- type HelloService
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeHealthRequest ¶
func DecodeHelloRequest ¶
func DecodeHelloResponse ¶
func EncodeJSONRequest ¶
func EncodeResponse ¶
func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
func MakeHealthEndpoint ¶
func MakeHelloEndpoint ¶
Types ¶
type HelloService ¶
type HelloService struct { }
func (HelloService) HealthCheck ¶
func (HelloService) HealthCheck() bool
func (HelloService) SayHello ¶
func (HelloService) SayHello(name string) string
Click to show internal directories.
Click to hide internal directories.