go-micro: github.com/micro/go-micro/api/handler Index | Files | Directories

package handler

import "github.com/micro/go-micro/api/handler"

Package handler provides http handlers


Package Files

handler.go options.go

type Handler Uses

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

Handler represents a HTTP handler that manages a request

type Option Uses

type Option func(o *Options)

func WithNamespace Uses

func WithNamespace(s string) Option

WithNamespace specifies the namespace for the handler

func WithRouter Uses

func WithRouter(r router.Router) Option

WithRouter specifies a router to be used by the handler

func WithService Uses

func WithService(s micro.Service) Option

WithService specifies a micro.Service

type Options Uses

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

func NewOptions Uses

func NewOptions(opts ...Option) Options

NewOptions fills in the blanks


apiPackage api provides an http-rpc handler which provides the entire http request over rpc
brokerPackage broker provides a go-micro/broker handler
cloudeventsPackage cloudevents provides a cloudevents handler publishing the event using the go-micro/client
eventPackage event provides a handler which publishes an event
filePackage file serves file relative to the current directory
httpPackage http is a http reverse proxy handler
registryPackage registry is a go-micro/registry handler
rpcPackage rpc is a go-micro rpc handler.
udpPackage udp reads and write from a udp connection
unixPackage unix reads from a unix socket expecting it to be in /tmp/path
webPackage web contains the web handler including websocket support

Package handler imports 3 packages (graph) and is imported by 54 packages. Updated 2020-02-19. Refresh now. Tools for package owners.