Declares a composable GPS simulation pipeline using Spark DSL.
Usage
defmodule MyApp.TaxiFleet do
use LocationSimulator.Pipeline
source :synthetic, direction: :north, elevation: 50
plug LocationSimulator.Plug.Callback, callback: MyApp.TaxiHandler
endThen start workers at runtime:
LocationSimulator.start(MyApp.TaxiFleet, worker: 3, event: 100, interval: 1_000)Default pipeline
If you want the legacy behaviour (no explicit pipeline module), pass a plain config map instead:
LocationSimulator.start(%{worker: 3, callback: MyApp.Handler})Options
:extensions(list of module that adoptsSpark.Dsl.Extension) - A list of DSL extensions to add to theSpark.Dsl:otp_app(atom/0) - The otp_app to use for any application configurable options:fragments(list ofmodule/0) - Fragments to include in theSpark.Dsl. See the fragments guide for more.