inference

package
v0.0.0-...-9fce2f1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler() pb.InferenceServer

Types

type Inference

type Inference interface {
	Call(context.Context, string, ...Option) (*Output, error)
}
var DefaultInference Inference

type Option

type Option func(*Options)

func Map

func Map(m map[string]string) Option

func Retries

func Retries(retries int) Option

func Seletor

func Seletor(s selector.Selector) Option

func Version

func Version(v string) Option

type Options

type Options struct {
	Selector selector.Selector

	// Call
	Retries int
	Version string
	Map     map[string]string
}

func NewOptions

func NewOptions(opts ...Option) Options

type Output

type Output struct {
	Payload []byte
}

func Call

func Call(c context.Context, name string, opts ...Option) (*Output, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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