SAService Architect Back to designer
SAService ArchitectDocumentation
Framework lifecycle context + environment + config -> instance

Makers

The generated dependency-injection boundary for functions, endpoints, clients, servers, serializers, and infrastructure.

When to use

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

Behavior

  • Generated defaults map graph elements to concrete framework constructors.
  • The custom maker hook runs before invocation and may replace selected defaults.
  • Independent makers run concurrently with shared cancellation after the first failure.
  • Each result is stored and reused for the service lifetime.

Maker and instance lifetime

Maker responsibilities

  • Create dependency clients and immutable collaborators.
  • Validate the typed graph config passed to the maker.
  • Return a function object whose hooks create per-request state.
  • Leave activation and shutdown to runtime lifecycle methods.

Hooks and boundaries properties

Generated extension points and runtime-owned lifecycle boundaries.

PropertyTypeDescription
contextcancellation/deadline

Cancels sibling initialization after a failure.

environmentServiceEnvironment

Logging, metrics, serde, callers, and runtime configuration.

configtyped graph config

Config for the stream, endpoint, connector, or service.

resultowned instance

Long-lived function or infrastructure object.

Lifecycle outline

customMakersInit(ctx) {
  makers.<function_name> = async (ctx, env, config) => new CustomFunction(...);
}