router

package
v1.0.0-alpha.test.10b Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDynamic

func NewDynamic() *dynamic

NewDynamic creates a new dynamic router that can be have its routes updated.

func NewStatic

func NewStatic(routes []*pb.Route) *static

Types

type Router

type Router interface {
	// Route returns a backend name for a given call, or an error.
	Route(ctx context.Context, fullMethodName string) (backendName string, err error)
}

Router is an interface that decides what backend a given stream should be directed to.

Jump to

Keyboard shortcuts

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