replace modules with go plugins.

This commit is contained in:
Miroslav Šedivý
2022-04-15 19:28:00 +00:00
parent f447cabe2e
commit a4bb108168
10 changed files with 587 additions and 74 deletions

22
pkg/types/plugins.go Normal file
View File

@ -0,0 +1,22 @@
package types
import (
"github.com/spf13/cobra"
)
type Plugin interface {
Config() PluginConfig
Start(PluginManagers)
Shutdown() error
}
type PluginConfig interface {
Init(cmd *cobra.Command) error
Set()
}
type PluginManagers struct {
SessionManager SessionManager
WebSocketManager WebSocketManager
ApiManager ApiManager
}