diff options
Diffstat (limited to 'docs/extensions.md')
-rw-r--r-- | docs/extensions.md | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/docs/extensions.md b/docs/extensions.md index b88f63f..b013554 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -1,9 +1,17 @@ % Plugins +# Current state -# Extensions +First, there were go plugins. This turned out to be impractical due to the limitations in plugins making them unsuitable for use outside of a small, strict, and (one could argue) useless use case. -- Plugins will supply an `Init()` function that will call the appropriate +Then I tried external static extensions. This approach used a trick to copy and modify the gotop main executable, which then imported it's own packages from upstream. This worked, but was awkward and required several steps to build. + +Currently, as I've only written two modules since I started down this path, and there's no clean, practical solution yet in Go, I've folded the extensions into the main codebase. This means there's no programmatic extension mechanism for gotop. + + +# Devices + +- Devices supply an `Init()` function that will call the appropriate `Register\*()` functions in the `github.com/xxxserxxx/gotop/devices` package. - `devices` will supply: - RegisterCPU (opt) |