testutils

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestBucket

func NewTestBucket(role, text string) merkle.Bucket

NewTestBucket creates a simple bucket for testing

Types

type MockEmbedder

type MockEmbedder struct {
	Embeddings map[string][]float32

	// FailOn causes Embed to return an error when the input text matches
	FailOn string
}

MockEmbedder is a test embedder that returns predictable embeddings

func NewMockEmbedder

func NewMockEmbedder() *MockEmbedder

func (*MockEmbedder) Close

func (m *MockEmbedder) Close() error

func (*MockEmbedder) Embed

func (m *MockEmbedder) Embed(_ context.Context, text string) ([]float32, error)

Jump to

Keyboard shortcuts

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