Back to

Package handler

Latest Go to latest

The highest tagged major version is v3.

Published: Dec 8, 2019 | License: Apache-2.0 | Module:


Package handler provides http handlers


type Handler

type Handler interface {
	// standard http handler
	// name of handler
	String() string

Handler represents a HTTP handler that manages a request

type Option

type Option func(o *Options)

func WithNamespace

func WithNamespace(s string) Option

WithNamespace specifies the namespace for the handler

func WithRouter

func WithRouter(r router.Router) Option

WithRouter specifies a router to be used by the handler

func WithService

func WithService(s micro.Service) Option

WithService specifies a micro.Service

type Options

type Options struct {
	Namespace string
	Router    router.Router
	Service   micro.Service

func NewOptions

func NewOptions(opts ...Option) Options

NewOptions fills in the blanks

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier