Help us shape the future of Go! Take the 2026 Go Developer Survey

module

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package module defines ingestion's Module contract and its dependency wiring. Modules are run by a host.Host; this package owns only what is ingestion- specific: the Deps bag and the Mount step that injects it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountAll

func MountAll(ctx context.Context, d Deps, mods ...Module) ([]host.Runnable, error)

MountAll injects d into each module and returns them as host.Runnables ready to hand to a host.Host.

Types

type Deps

type Deps struct {
	Bus       eventbus.Bus
	DataStore filament.DataStore
	Secrets   filament.Secrets
	Runtime   filament.Runtime
	Dispatch  filament.Dispatcher

	Sources filament.SourceRegistry
	Sinks   filament.SinkRegistry
	// Worker answers connector questions without the module holding a driver.
	Worker filament.Worker

	Log     filament.Logger
	Metrics filament.Metrics
	Tracer  filament.Tracer
}

Deps is everything a module may need, injected at Mount. A module takes only the fields it uses; the rest stay nil. Infra providers are bound once at boot; the registries resolve workload providers (Source, Sink) per run.

type Module

type Module interface {
	host.Runnable
	// Mount wires the module to its providers. Called once, before the host
	// runs it. Cheap setup only — no blocking, no bus reads.
	Mount(ctx context.Context, d Deps) error
}

Module is an ingestion behavior — scheduler, orchestrator, engine, tracker, stream. It is a host.Runnable (name + subscriptions) plus a Mount step that captures its providers from Deps. Modules never reference each other.

Jump to

Keyboard shortcuts

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