dispatcher

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatcherWrapper

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

DispatcherWrapper is used when a dispatcher can't be constructed at server creation time. The most common use for this is when the dispatcher needs to know some information about the server to be constructed. For example it is sometimes helpful to know the server's endpoints. In such cases you can construct a DispatcherWrapper which will simply block all lookups until the real dispatcher is set with SetDispatcher.

func NewDispatcherWrapper

func NewDispatcherWrapper() *DispatcherWrapper

NewDispatcherWrapper creates a new DispatcherWrapper.

func (*DispatcherWrapper) Lookup

func (w *DispatcherWrapper) Lookup(ctx *context.T, suffix string) (interface{}, security.Authorizer, error)

Lookup will wait until SetDispatcher is called and then simply forward requests to the underlying dispatcher.

func (*DispatcherWrapper) SetDispatcher

func (w *DispatcherWrapper) SetDispatcher(d rpc.Dispatcher)

SetDispatcher sets the underlying dispatcher and allows Lookups to proceed.

Jump to

Keyboard shortcuts

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