wiring

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: GPL-2.0, GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package wiring holds composition-root types that connect concrete implementations across the api, metrics, search, and provider packages.

This package exists to break import cycles that would otherwise arise from defining wiring types (Func) in api/ alongside cross-cutting concerns. wiring/ depends on boundary packages without polluting either with the other's symbols.

wiring/ is import-only by main.go (the composition root) and server/ (which receives a Func via WithWire and calls it on each config reload). No package other than these two should import wiring/.

wiring/ is also a convenient home for cross-package compile-time assertions where neither side can hold the assertion without creating a cycle (e.g. embedded.Detector satisfies search.TrackDetector, but search/ can't import embedded/ and embedded/ shouldn't import search/).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

Func creates the search engine, scorer, and loaded providers from config. Called during Start and hot reload. The context allows cancellation of provider initialization (e.g. network calls during provider setup).

Jump to

Keyboard shortcuts

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