Reactor.Dsl.Build protocol (reactor v0.12.1)

View Source

A protocol which DSL entities must implement.

Summary

Types

t()

All the types that implement this protocol.

Functions

Build an entity into a Reactor.

Perform any after-compilation verification that is needed to make the entity work.

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

build(entity, reactor)

@spec build(t(), Reactor.t()) :: {:ok, Reactor.t()} | {:error, any()}

Build an entity into a Reactor.

This function is called during conversion of a DSL module into a Reactor struct. This allows extensions to specify the behaviour of how they want to alter the structure of the Reactor.

verify(entity, dsl_state)

@spec verify(t(), Spark.Dsl.t()) :: :ok | {:error, any()}

Perform any after-compilation verification that is needed to make the entity work.

See Spark.Dsl.Verifier for more information.