type

BlockRegistry

BlockRegistry owns the block definitions of one configuration, one per slug. Blocks registered centrally and blocks declared inline in a Blocks field or an embedded tree case are the same kind of definition: binding interns every inline declaration by slug, so each definition is bound once and shared by all of its placements. Bound containers select their definitions by slug and do not grant a placement mutation rights over a shared definition.

Full signature

type BlockRegistry struct { // contains filtered or unexported fields }

Source field/block_registry.go:18

Methods

  • BlockRegistry.Bind()

    Bind returns a detached field graph whose containers select shared definitions. Policy closures remain application-owned and execute normally per occurrence.

  • BlockRegistry.BindAt()

    BindAt is Bind with the resource's authored path in diagnostics. Inline declarations are interned into the registry: a slug declared before must have an identical declaration, or binding fails naming both.

  • BlockRegistry.Blocks()

    Blocks returns detached definitions: central registrations in order, then interned inline declarations in the order they were first bound.