mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-06-17 22:16:07 +00:00
Export NodeInfoPayload type, rename some API functions
This commit is contained in:
@ -85,14 +85,15 @@ func (a *AdminSocket) Init(c *yggdrasil.Core, state *config.NodeState, log *log.
|
||||
*/
|
||||
a.AddHandler("getSelf", []string{}, func(in Info) (Info, error) {
|
||||
ip := c.Address().String()
|
||||
subnet := c.Subnet()
|
||||
return Info{
|
||||
"self": Info{
|
||||
ip: Info{
|
||||
"box_pub_key": c.BoxPubKey(),
|
||||
"box_pub_key": c.EncryptionPublicKey(),
|
||||
"build_name": yggdrasil.BuildName(),
|
||||
"build_version": yggdrasil.BuildVersion(),
|
||||
"coords": fmt.Sprintf("%v", c.Coords()),
|
||||
"subnet": c.Subnet().String(),
|
||||
"subnet": subnet.String(),
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
|
Reference in New Issue
Block a user