SAService Architect Back to designer
SAService ArchitectDocumentation
Framework lifecycle StartService / StopService

Go lifecycle

Go maker initialization, graph construction, source-last startup, and context-bounded drain.

When to use

Use this page when implementing maker hooks, owning resources, or diagnosing startup and shutdown.

Behavior

  • initMakers fills missing defaults, then customMakersInit may replace them.
  • initFunctions and infrastructure makers use errgroup for concurrent creation and sibling cancellation.
  • ServiceApp.Start builds streams and starts managed connectors, storage, pools, components, Sinks, then Sources.
  • StopService creates the timeout context consumed by every stop phase.

Go startup sequence

Go shutdown sequence

  • HTTP admission, components, and ordinary Sources stop first.
  • Managed connector admission stops after ordinary Sources, preserving Cron-to-Temporal work.
  • Nested parallel graph calls drain before pools and storage.
  • Sinks stop before managed clients; telemetry stops last.

Hooks and boundaries properties

Generated extension points and runtime-owned lifecycle boundaries.

PropertyTypeDescription
initMakersgenerated

Installs defaults only where no maker exists.

customMakersInituser hook

Replaces makers before construction.

customFunctionsInituser hook

Adjusts instances before stream construction.

Start(ctx)runtime

Activates downstream resources before Sources.

Stop(ctx)runtime

Uses the deadline applied by StopService.

Lifecycle outline

configure -> make once -> bind -> start -> admit -> drain -> stop