mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Export NodeInfoPayload type, rename some API functions
This commit is contained in:
		
							parent
							
								
									377f88512b
								
							
						
					
					
						commit
						24f4754f2b
					
				
					 4 changed files with 27 additions and 38 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue