multiplex

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(name string, c envelope.Client) envelope.Client

NewClient builds a new multiplexing client.

name is the name of the service for which requests are being sent through this client.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler implements a service multiplexer

func NewHandler

func NewHandler() Handler

NewHandler builds a new handler.

func (Handler) Handle

func (h Handler) Handle(name string, req wire.Value) (wire.Value, error)

Handle handles the given request, dispatching to one of the registered services.

func (Handler) Put

func (h Handler) Put(name string, service envelope.Handler)

Put adds the given service to the multiplexer.

Jump to

Keyboard shortcuts

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