proxy

package
v0.0.0-...-388aa53 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTimeout timeout
	ErrTimeout = errors.New("timeout")
)

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option option

func WithDim

func WithDim(dim int) Option

WithDim with dim option

func WithSearchTimeout

func WithSearchTimeout(timeout time.Duration) Option

WithSearchTimeout with timeout option

type Proxy

type Proxy interface {
	UpdateWithIds(db uint64, extXid int64, extXb []float32) error
	AddWithIds(newXb []float32, newXids []int64) error
	Search(xq []float32) ([]uint64, []float32, []int64, error)
}

Proxy is proxy for versiondb

func NewMQBasedProxy

func NewMQBasedProxy(topic string, addrs []string, prophetAddrs []string, opts ...Option) (Proxy, error)

NewMQBasedProxy return a Proxy based on mq

Jump to

Keyboard shortcuts

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