Back to godoc.org

Package handler

v1.18.0
Latest Go to latest

The highest tagged major version is v3.

Published: Dec 8, 2019 | License: Apache-2.0 | Module: github.com/micro/go-micro

Overview

Package handler provides http handlers

Index

type Handler

type Handler interface {
	// standard http handler
	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