diun icon indicating copy to clipboard operation
diun copied to clipboard

Best way to run the tool programmatically via Go?

Open mickmister opened this issue 3 years ago • 1 comments

I would like to import Diun's code into a separate Go project, and run the service programmatically within my program. I imagine this allows for a deeper integration, having direct access to the tool's resources. I'm planning on wrapping Diun into a Mattermost server-side plugin, which is a process running Go code. I'd like to package the integration this way, so the Diun server can be hosted automatically by the admin installing the plugin to their server.

How might I go about integrating directly with Diun's code? It looks like cmd/serve.go is a good starting point to understand how to integrate, and is possibly the existing entrypoint (or its contents) needed to reach into Diun's functionality. Is there a more appropriate way to integrate directly with the source code?

mickmister avatar May 13 '22 07:05 mickmister

Don't think you can atm as much of the logic is in the internal package and therefore not exposed.

crazy-max avatar Dec 28 '22 01:12 crazy-max