rpc

package
v0.0.0-...-71a9ee9 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Log    *log.Logger
	Server *rpc.Server
	Prefix string
}

Middleware is a struct that has a ServeHTTP method

func New

func New(logger *log.Logger, prefix string, service interface{}) *Middleware

func (*Middleware) Add

func (mw *Middleware) Add(name string, service interface{})

-----------------------------------------------------------------------------

func (*Middleware) ServeHTTP

func (mw *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)

ServeHTTP is the middleware handler

Jump to

Keyboard shortcuts

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