Skip to content
New issue

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

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

Already on GitHub? # to your account

Embedding API #309

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Embedding API #309

wants to merge 10 commits into from

Conversation

rubiojr
Copy link
Collaborator

@rubiojr rubiojr commented May 7, 2020

Highlights:

  • Exposes a new reactor package (not particularly attached to this name) .
  • Doesn't change existing API.

This makes it easier to:

  • Embed Beehive's in other binaries or libraries.
  • Create custom Beehive binaries with additional hive packages hosted elsewhere.
  • Create specialized binaries which benefit from Beehive's vast catalog of bees, making it possible to create really powerful interactions with a few lines of code.

Clients embedding Beehive's don't have a built-in HTTP API server started by default, which is probably desirable and safer if you're programming your own chains, as opposed to using the GUI to create them.

I've included an example that demonstrates embedding. Also implemented the Hello bee action the example is using.

In future iterations, we could expose an interface to start/stop the API server also, maybe add a few functions that wrap the event, action and chain creation while adding some safety.

@rubiojr
Copy link
Collaborator Author

rubiojr commented May 22, 2020

A slightly more complex example that demonstrates using an out-of-tree bee in an external repo: https://github.com/rubiojr/commit-monitor

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.705% when pulling e098b31 on reactor into f8fd3de on master.

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

Successfully merging this pull request may close these issues.

2 participants