I have a Go lib which does concurrent processing on variable data, I have a (simplified) interface:
type Handler interface {
Accepts(id []byte) bool
ProcessUnit(u []byte) []byte
}
Currently, library end-developer (user) might write go code which implements this interface and a library can work on end-developer data structures.
Now the real question: (lets skip overhead), is it possible to provide implementation of that interface written in another language (with Python in mind)? My intention is to provide a "Plugin API" so anyone can add handlers, written in eg: Python (or possibly other languages)
I already have a working implementation which uses zeromq to pass data around go<->python, but this feels "non-natural". The utopia I want to achieve is that an lib user places plugins.py
file in predefined location, and go can load plugins automatically on startup, is it possible or I'm looking in wrong direction?