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 LocalAddressProvider ¶
LocalAddressProvider provides local address information.
func NewLocalAddressProvider ¶
func NewLocalAddressProvider(st state.State) (LocalAddressProvider, error)
NewLocalAddressProvider initializes and returns a new LocalAddressProvider.
type RemoteBackendFactory ¶
RemoteBackendFactory provides backend generation by address (target).
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router wraps grpc-proxy StreamDirector.
func NewRouter ¶
func NewRouter(backendFactory RemoteBackendFactory, localBackend proxy.Backend, localAddressProvider LocalAddressProvider) *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 ¶
Register is no-op to implement factory.Registrator interface.
Actual proxy handler is installed via grpc.UnknownServiceHandler option.
func (*Router) RegisterStreamedRegex ¶
RegisterStreamedRegex register regex for streamed method.
This could be exact literal match: /^\/serviceName\/methodName$/ or any suffix/prefix match.
func (*Router) StreamedDetector ¶
StreamedDetector implements proxy.StreamedDetector.