Documentation ¶
Index ¶
- type BM25FunctionRunner
- type FunctionRunner
- type MockFunctionRunner
- type MockFunctionRunner_BatchRun_Call
- func (_c *MockFunctionRunner_BatchRun_Call) Return(_a0 []interface{}, _a1 error) *MockFunctionRunner_BatchRun_Call
- func (_c *MockFunctionRunner_BatchRun_Call) Run(run func(inputs ...interface{})) *MockFunctionRunner_BatchRun_Call
- func (_c *MockFunctionRunner_BatchRun_Call) RunAndReturn(run func(...interface{}) ([]interface{}, error)) *MockFunctionRunner_BatchRun_Call
- type MockFunctionRunner_Expecter
- type MockFunctionRunner_GetOutputFields_Call
- func (_c *MockFunctionRunner_GetOutputFields_Call) Return(_a0 []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
- func (_c *MockFunctionRunner_GetOutputFields_Call) Run(run func()) *MockFunctionRunner_GetOutputFields_Call
- func (_c *MockFunctionRunner_GetOutputFields_Call) RunAndReturn(run func() []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
- type MockFunctionRunner_GetSchema_Call
- func (_c *MockFunctionRunner_GetSchema_Call) Return(_a0 *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
- func (_c *MockFunctionRunner_GetSchema_Call) Run(run func()) *MockFunctionRunner_GetSchema_Call
- func (_c *MockFunctionRunner_GetSchema_Call) RunAndReturn(run func() *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
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 NewBM25FunctionRunner ¶
func NewBM25FunctionRunner(coll *schemapb.CollectionSchema, schema *schemapb.FunctionSchema) (*BM25FunctionRunner, error)
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 ¶
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 (_m *MockFunctionRunner) EXPECT() *MockFunctionRunner_Expecter
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 ¶
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 ¶
func (_e *MockFunctionRunner_Expecter) GetOutputFields() *MockFunctionRunner_GetOutputFields_Call
GetOutputFields is a helper method to define mock.On call
func (*MockFunctionRunner_Expecter) GetSchema ¶
func (_e *MockFunctionRunner_Expecter) GetSchema() *MockFunctionRunner_GetSchema_Call
GetSchema is a helper method to define mock.On call
type MockFunctionRunner_GetOutputFields_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 (_c *MockFunctionRunner_GetOutputFields_Call) Return(_a0 []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
func (*MockFunctionRunner_GetOutputFields_Call) Run ¶
func (_c *MockFunctionRunner_GetOutputFields_Call) Run(run func()) *MockFunctionRunner_GetOutputFields_Call
func (*MockFunctionRunner_GetOutputFields_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_GetOutputFields_Call) RunAndReturn(run func() []*schemapb.FieldSchema) *MockFunctionRunner_GetOutputFields_Call
type MockFunctionRunner_GetSchema_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 (_c *MockFunctionRunner_GetSchema_Call) Return(_a0 *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call
func (*MockFunctionRunner_GetSchema_Call) Run ¶
func (_c *MockFunctionRunner_GetSchema_Call) Run(run func()) *MockFunctionRunner_GetSchema_Call
func (*MockFunctionRunner_GetSchema_Call) RunAndReturn ¶
func (_c *MockFunctionRunner_GetSchema_Call) RunAndReturn(run func() *schemapb.FunctionSchema) *MockFunctionRunner_GetSchema_Call