diff --git a/dev/v1.ex b/dev/v1.ex new file mode 100644 index 0000000..d959af4 --- /dev/null +++ b/dev/v1.ex @@ -0,0 +1,13 @@ +defmodule Inngest.Dev.EventFn2 do + @moduledoc false + + use Inngest.V1.Function + alias Inngest.Function.{Opts, Trigger} + + @fn_opts %Opts{name: "test func v2"} + @trigger %Trigger{event: "test/hello"} + + def run(args) do + {:ok, "Hello world"} + end +end diff --git a/lib/inngest/v1/function.ex b/lib/inngest/v1/function.ex new file mode 100644 index 0000000..1a31f81 --- /dev/null +++ b/lib/inngest/v1/function.ex @@ -0,0 +1,17 @@ +defmodule Inngest.V1.Function do + alias Inngest.Config +end + +defmodule Inngest.Function.Opts do + defstruct [ + :id, + :name, + :retries + ] + + @type t() :: %__MODULE__{ + id: binary(), + name: binary(), + retries: number() + } +end