Skip to content

Configuration Reference

Full API documentation lives on pkg.go.dev/github.com/foomo/maestro — this page covers the tunable knobs on player.Options and soloist.Options, since those aren't fully self-explanatory from godoc alone. See The 3PC Protocol for what each timeout actually gates.

player.Options

FieldTypeDefaultNotes
Transporttransport.TransportRequired. Build via transport.NewTransport(nc).
BlobReaderblobstore.BlobReaderRequired. Read-only; the Player never writes.
StageHandlerplayer.StageHandlerRequired. See Implementing StageHandler.
InstanceIDstringRoster key. Use a stable identity (pod hostname), not a per-boot random value.
HeartbeatPeriodtime.Duration5sLower = faster roster convergence, more NATS traffic.
DownloadConcurrencyint4Parallel blob fetches within one PreCommit.
MeterProvidermetric.MeterProviderotel.GetMeterProvider()OTel metrics.
TracerProvidertrace.TracerProviderotel.GetTracerProvider()OTel tracing.
Logger*zap.Loggerzap.NewNop()

soloist.Options

FieldTypeDefaultNotes
Transporttransport.TransportRequired. Build via transport.NewTransport(nc).
BlobStoreblobstore.BlobStoreRequired.
InstanceIDstringNot part of the protocol's identity scheme; used for logging.
HeartbeatWindowtime.Duration15sA player is "alive" if a heartbeat arrived within this window. Round targeting additionally requires it to be wired — see The roster.
RosterScanTicktime.Duration5sHow often the resync loop checks for stale players.
ResyncDebouncetime.Duration10sMinimum gap between two resync rounds.
CanCommitTimeouttime.Duration10sPhase 1 deadline. Timeout aborts the round.
StageTimeoutfunc(totalSize int64) time.Duration~2× size / 10 MiB/s, clamped [60s, 30m]Phase 2 deadline. Timeout aborts the round. Override for slow StageHandler.Stage decode logic.
DoCommitTimeouttime.Duration10sPhase 3 deadline. Timeout does not abort — stragglers are marked dirty for the next resync.
MeterProvidermetric.MeterProviderotel.GetMeterProvider()OTel metrics.
TracerProvidertrace.TracerProviderotel.GetTracerProvider()OTel tracing.
Logger*zap.Loggerzap.NewNop()

Player state predicates

MethodTrue whenUse for
Wired()The broker has acknowledged all four round subscriptions. The player will receive the next round.Kubernetes readiness probe. See Keel integration.
Ready()The first DoCommit has succeeded — the player has activated some version."Do I have data yet?" in your own handler. Not a pod-health signal.

Until Wired() is true the player heartbeats with Heartbeat.NotWired and the Soloist leaves it out of round targeting, so a starting pod cannot abort a publish for its peers.

Errors

Sentinel errors defined in the root maestro package (errors.go), returned wrapped via %w from the relevant call sites:

ErrorMeaning
ErrNoPlayersNo players in roster at the time an operation expected at least one.
ErrAbortRound was aborted.
ErrGenStaleA message carried a generation token older than the current boot epoch.
ErrManifestMismatchManifest.Validate() failed — see BlobStore.
ErrBlobstoreMismatchSoloist and Player disagree on blobstore kind.
ErrDuplicateInstanceDuplicate InstanceID observed in the roster.
ErrRoundInFlightAnother round is already running.
ErrUnsafeNameA manifest file name failed the path-safety check (github.com/foomo/go/sec).

Packages

PackagePurpose
github.com/foomo/maestroVersion, Manifest, sentinel errors — shared by both roles.
.../pkg/soloistWriter role: Soloist, Publish, IngestFiles.
.../pkg/playerReader role: Player, StageHandler, FileSource.
.../pkg/transportTyped pub/sub bundle (Transport, NewTransport) over goflux+NATS.
.../pkg/blobstoreBlobStore / BlobReader interfaces.
.../pkg/blobstore/localfsFilesystem-backed BlobStore + HTTP Handler/Client.