Allow use as a Library
JamesLaverack opened this issue · comments
Following a discussion on Slack there's a desire to make the APIs for Paranoia available for use. Presently they are in internal/
which forbids their use by other programs (convention by the Go compiler).
We have a few options:
- Move all code currently under
internal/
topkg/
, exposing all of it as an API surface. - Add new code under
pkg/
that calls the implementation ininternal/
, exposing a more selected API surface.
The latter would be more work, but would expose an intentfully designed API instead of everything, which might make future code changes easier without breaking changes.
cc @mt-inside
I'd definitely go with the 2nd option - a deliberately designed API. Loose coupled APIs will give so much more flexibility
+1 to the above, contingent on us securing enough development effort to make progress on it in a timely fashion (i.e. completing it in weeks rather than months or years). If we can't and it's preventing potentially valuable use-cases then I'd say just expose the lot for now and let people have at it. Whilst not ideal I'd say it's better than blocking the code from being made use of.