function

package
v0.10.3-0...-843c1f5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BM25FunctionRunner

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

BM25 Runner Input: string Output: map[uint32]float32

func (*BM25FunctionRunner) BatchRun

func (v *BM25FunctionRunner) BatchRun(inputs ...any) ([]any, error)

func (*BM25FunctionRunner) GetOutputFields

func (v *BM25FunctionRunner) GetOutputFields() []*schemapb.FieldSchema

func (*BM25FunctionRunner) GetSchema

func (v *BM25FunctionRunner) GetSchema() *schemapb.FunctionSchema

type FunctionRunner

type FunctionRunner interface {
	BatchRun(inputs ...any) ([]any, error)

	GetSchema() *schemapb.FunctionSchema
	GetOutputFields() []*schemapb.FieldSchema
}

func NewFunctionRunner

func NewFunctionRunner(coll *schemapb.CollectionSchema, schema *schemapb.FunctionSchema) (FunctionRunner, error)

type MockFunctionRunner

type MockFunctionRunner struct {
	mock.Mock
}

MockFunctionRunner is an autogenerated mock type for the FunctionRunner type

func NewMockFunctionRunner

func NewMockFunctionRunner(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockFunctionRunner

NewMockFunctionRunner creates a new instance of MockFunctionRunner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockFunctionRunner) BatchRun

func (_m *MockFunctionRunner) BatchRun(inputs ...interface{}) ([]interface{}, error)

BatchRun provides a mock function with given fields: inputs

func (*MockFunctionRunner) EXPECT

func (*MockFunctionRunner) GetOutputFields

func (_m *MockFunctionRunner) GetOutputFields() []*schemapb.FieldSchema

GetOutputFields provides a mock function with given fields:

func (*MockFunctionRunner) GetSchema

func (_m *MockFunctionRunner) GetSchema() *schemapb.FunctionSchema

GetSchema provides a mock function with given fields:

type MockFunctionRunner_BatchRun_Call

type MockFunctionRunner_BatchRun_Call struct {
	*mock.Call
}

MockFunctionRunner_BatchRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchRun'

func (*MockFunctionRunner_BatchRun_Call) Return

func (_c *MockFunctionRunner_BatchRun_Call) Return(_a0 []interface{}, _a1 error) *MockFunctionRunner_BatchRun_Call

func (*MockFunctionRunner_BatchRun_Call) Run

func (_c *MockFunctionRunner_BatchRun_Call) Run(run func(inputs ...interface{})) *MockFunctionRunner_BatchRun_Call

func (*MockFunctionRunner_BatchRun_Call) RunAndReturn

func (_c *MockFunctionRunner_BatchRun_Call) RunAndReturn(run func(...interface{}) ([]interface{}, error)) *MockFunctionRunner_BatchRun_Call

type MockFunctionRunner_Expecter

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

func (*MockFunctionRunner_Expecter) BatchRun

func (_e *MockFunctionRunner_Expecter) BatchRun(inputs ...interface{}) *MockFunctionRunner_BatchRun_Call

BatchRun is a helper method to define mock.On call

  • inputs ...interface{}

func (*MockFunctionRunner_Expecter) GetOutputFields

GetOutputFields is a helper method to define mock.On call

func (*MockFunctionRunner_Expecter) GetSchema

GetSchema is a helper method to define mock.On call

type MockFunctionRunner_GetOutputFields_Call

type MockFunctionRunner_GetOutputFields_Call struct {
	*mock.Call
}

MockFunctionRunner_GetOutputFields_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOutputFields'

func (*MockFunctionRunner_GetOutputFields_Call) Return

func (*MockFunctionRunner_GetOutputFields_Call) Run

func (*MockFunctionRunner_GetOutputFields_Call) RunAndReturn

type MockFunctionRunner_GetSchema_Call

type MockFunctionRunner_GetSchema_Call struct {
	*mock.Call
}

MockFunctionRunner_GetSchema_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchema'

func (*MockFunctionRunner_GetSchema_Call) Return

func (*MockFunctionRunner_GetSchema_Call) Run

func (*MockFunctionRunner_GetSchema_Call) RunAndReturn

Jump to

Keyboard shortcuts

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