router

package
v0.1.1-rc.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDynamic

func NewDynamic(logger logrus.FieldLogger) *dynamic

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

func NewStatic

func NewStatic(logger logrus.FieldLogger, 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