mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-06-18 00:36:07 +00:00
Add type core.AddHandlerFunc
This commit is contained in:
@ -242,9 +242,11 @@ func (c *Core) PublicKey() ed25519.PublicKey {
|
||||
// Hack to get the admin stuff working, TODO something cleaner
|
||||
|
||||
type AddHandler interface {
|
||||
AddHandler(name string, args []string, handlerfunc func(json.RawMessage) (interface{}, error)) error
|
||||
AddHandler(name string, args []string, handlerfunc AddHandlerFunc) error
|
||||
}
|
||||
|
||||
type AddHandlerFunc func(json.RawMessage) (interface{}, error)
|
||||
|
||||
// SetAdmin must be called after Init and before Start.
|
||||
// It sets the admin handler for NodeInfo and the Debug admin functions.
|
||||
func (c *Core) SetAdmin(a AddHandler) error {
|
||||
|
Reference in New Issue
Block a user