Skip to content

Create OTP like behaviour #28

@adkron

Description

@adkron

It would be nice for a user to be able to create something that mimics OTP and handles a lot of the processing and hands things to the user.

defmodule MyService do
  use DeonEx

  def start(_) do
    # ...
  end

  def init(_) do
    # ...
  end

  def handle_output(output, state) do
  end

  def handle_error(error, state) do
  end

  def send_input(deno_process, thing) do
    DenoEx.Send(deno_process, thing)
  end
end

This allows the user to track their state and progress. We can hide the majority of the deno process data from them and let them only handle their own deno state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions