tfservingproxy

package
v0.0.0-...-0e5f22e Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcProxy

type GrpcProxy struct {
	GrpcProxy *grpc.Server
	// contains filtered or unexported fields
}

GrpcProxy is the proxy for the TFServing GRPC api that directs api calls to the right nodes

func NewGrpcProxy

func NewGrpcProxy(clientProvider func(modelName string, version string) (*grpc.ClientConn, error)) *GrpcProxy

NewGrpcProxy creates a new GrpcProxy for TF Serving

func (*GrpcProxy) Close

func (proxy *GrpcProxy) Close() error

Close stops the grpc proxy ser

func (*GrpcProxy) Listen

func (proxy *GrpcProxy) Listen(port int) error

Listen starts the grpc server that proxies TF serving GRPC api calls

type RestProxy

type RestProxy struct {
	RestProxy *httputil.ReverseProxy
	// contains filtered or unexported fields
}

RestProxy is the proxy for the TFServing HTTP REST api that directs api calls to the right nodes

func NewRestProxy

func NewRestProxy(handler func(req *http.Request, modelName string, version string) error) *RestProxy

NewRestProxy creates a new RestProxy for TF Serving

func (*RestProxy) Serve

func (handler *RestProxy) Serve() func(http.ResponseWriter, *http.Request)

Serve returns the HTTP handler function for TF serving REST api proxying

Jump to

Keyboard shortcuts

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