mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
21 lines
583 B
Go
21 lines
583 B
Go
|
package module
|
||
|
|
||
|
import (
|
||
|
"github.com/gologme/log"
|
||
|
|
||
|
"github.com/yggdrasil-network/yggdrasil-go/src/admin"
|
||
|
"github.com/yggdrasil-network/yggdrasil-go/src/config"
|
||
|
"github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil"
|
||
|
)
|
||
|
|
||
|
// Module is an interface that defines which functions must be supported by a
|
||
|
// given Yggdrasil module.
|
||
|
type Module interface {
|
||
|
Init(core *yggdrasil.Core, state *config.NodeState, log *log.Logger, options interface{}) error
|
||
|
Start() error
|
||
|
Stop() error
|
||
|
UpdateConfig(config *config.NodeConfig)
|
||
|
SetupAdminHandlers(a *admin.AdminSocket)
|
||
|
IsStarted() bool
|
||
|
}
|