Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create OTP like behaviour #28

Open
adkron opened this issue May 31, 2023 · 0 comments
Open

Create OTP like behaviour #28

adkron opened this issue May 31, 2023 · 0 comments

Comments

@adkron
Copy link
Collaborator

adkron commented May 31, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant