mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	cleaned up develop branch
This commit is contained in:
		
							parent
							
								
									2d36105eeb
								
							
						
					
					
						commit
						976bd70c96
					
				
					 14 changed files with 96 additions and 96 deletions
				
			
		| 
						 | 
				
			
			@ -122,7 +122,7 @@ func (c *Core) Listen(u *url.URL, sintf string) (*TcpListener, error) {
 | 
			
		|||
	return c.links.tcp.listenURL(u, sintf)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Address gets the IPv6 address of the Yggdrasil node. This is always a /128
 | 
			
		||||
// Address gets the IPv6 address of the Mesh node. This is always a /128
 | 
			
		||||
// address. The IPv6 address is only relevant when the node is operating as an
 | 
			
		||||
// IP router and often is meaningless when embedded into an application, unless
 | 
			
		||||
// that application also implements either VPN functionality or deals with IP
 | 
			
		||||
| 
						 | 
				
			
			@ -132,7 +132,7 @@ func (c *Core) Address() net.IP {
 | 
			
		|||
	return addr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Subnet gets the routed IPv6 subnet of the Yggdrasil node. This is always a
 | 
			
		||||
// Subnet gets the routed IPv6 subnet of the Mesh node. This is always a
 | 
			
		||||
// /64 subnet. The IPv6 subnet is only relevant when the node is operating as an
 | 
			
		||||
// IP router and often is meaningless when embedded into an application, unless
 | 
			
		||||
// that application also implements either VPN functionality or deals with IP
 | 
			
		||||
| 
						 | 
				
			
			@ -143,7 +143,7 @@ func (c *Core) Subnet() net.IPNet {
 | 
			
		|||
	return net.IPNet{IP: subnet, Mask: net.CIDRMask(64, 128)}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetLogger sets the output logger of the Yggdrasil node after startup. This
 | 
			
		||||
// SetLogger sets the output logger of the Mesh node after startup. This
 | 
			
		||||
// may be useful if you want to redirect the output later. Note that this
 | 
			
		||||
// expects a Logger from the github.com/gologme/log package and not from Go's
 | 
			
		||||
// built-in log package.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,8 +21,8 @@ import (
 | 
			
		|||
	"github.com/RiV-chain/RiV-mesh/src/version"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// The Core object represents the Yggdrasil node. You should create a Core
 | 
			
		||||
// object for each Yggdrasil node you plan to run.
 | 
			
		||||
// The Core object represents the Mesh node. You should create a Core
 | 
			
		||||
// object for each Mesh node you plan to run.
 | 
			
		||||
type Core struct {
 | 
			
		||||
	// This is the main data structure that holds everything else for a node
 | 
			
		||||
	// We're going to keep our own copy of the provided config - that way we can
 | 
			
		||||
| 
						 | 
				
			
			@ -116,7 +116,7 @@ func (c *Core) _addPeerLoop() {
 | 
			
		|||
	})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Start starts up Yggdrasil using the provided config.NodeConfig, and outputs
 | 
			
		||||
// Start starts up Mesh using the provided config.NodeConfig, and outputs
 | 
			
		||||
// debug logging through the provided log.Logger. The started stack will include
 | 
			
		||||
// TCP and UDP sockets, a multicast discovery socket, an admin socket, router,
 | 
			
		||||
// switch and DHT node. A config.NodeState is returned which contains both the
 | 
			
		||||
| 
						 | 
				
			
			@ -159,7 +159,7 @@ func (c *Core) _start(nc *config.NodeConfig, log *log.Logger) error {
 | 
			
		|||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Stop shuts down the Yggdrasil node.
 | 
			
		||||
// Stop shuts down the Mesh node.
 | 
			
		||||
func (c *Core) Stop() {
 | 
			
		||||
	phony.Block(c, func() {
 | 
			
		||||
		c.log.Infoln("Stopping...")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue