Back to

Package multiplex

Latest Go to latest
Published: Jun 24, 2020 | License: MIT | Module:


Package Files

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.

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.

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

Jump to identifier

Keyboard shortcuts

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