director

package
v0.6.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package director provides proxy call routing facility

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

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

Router wraps grpc-proxy StreamDirector

func NewRouter

func NewRouter() *Router

NewRouter builds new Router

func (*Router) Director

func (r *Router) Director(ctx context.Context, fullMethodName string) (proxy.Mode, []proxy.Backend, error)

Director implements proxy.StreamDirector function

func (*Router) Register

func (r *Router) Register(srv *grpc.Server)

Register is no-op to implement factory.Registrator interface.

Actual proxy handler is installed via grpc.UnknownServiceHandler option.

func (*Router) RegisterLocalBackend

func (r *Router) RegisterLocalBackend(serviceName string, backend proxy.Backend)

RegisterLocalBackend registers local backend by service name.

Jump to

Keyboard shortcuts

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