mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 15:15:07 +03:00
changed dependencies to https://github.com/RiV-chain/RiV-mesh repo
This commit is contained in:
parent
af9260c802
commit
1dce2d51be
42 changed files with 187 additions and 187 deletions
|
@ -12,8 +12,8 @@ import (
|
|||
//"time"
|
||||
|
||||
"github.com/gologme/log"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
//"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
//"github.com/RiV-chain/RiV-mesh/src/crypto"
|
||||
//"github.com/Arceliar/phony"
|
||||
)
|
||||
|
||||
|
@ -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.
|
||||
|
|
|
@ -16,13 +16,13 @@ import (
|
|||
"github.com/Arceliar/phony"
|
||||
"github.com/gologme/log"
|
||||
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/config"
|
||||
//"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/version"
|
||||
"github.com/RiV-chain/RiV-mesh/src/config"
|
||||
//"github.com/RiV-chain/RiV-mesh/src/crypto"
|
||||
"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...")
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"github.com/gologme/log"
|
||||
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/config"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/defaults"
|
||||
"github.com/RiV-chain/RiV-mesh/src/config"
|
||||
"github.com/RiV-chain/RiV-mesh/src/defaults"
|
||||
)
|
||||
|
||||
// GenerateConfig produces default configuration with suitable modifications for tests.
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
//"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/util"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
"github.com/RiV-chain/RiV-mesh/src/util"
|
||||
"golang.org/x/net/proxy"
|
||||
//"github.com/Arceliar/phony" // TODO? use instead of mutexes
|
||||
)
|
||||
|
|
|
@ -12,9 +12,9 @@ import (
|
|||
iwt "github.com/Arceliar/ironwood/types"
|
||||
"github.com/Arceliar/phony"
|
||||
|
||||
//"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/version"
|
||||
//"github.com/RiV-chain/RiV-mesh/src/crypto"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
"github.com/RiV-chain/RiV-mesh/src/version"
|
||||
)
|
||||
|
||||
// NodeInfoPayload represents a RequestNodeInfo response, in bytes.
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
iwt "github.com/Arceliar/ironwood/types"
|
||||
"github.com/Arceliar/phony"
|
||||
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -26,8 +26,8 @@ import (
|
|||
|
||||
"golang.org/x/net/proxy"
|
||||
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
//"github.com/yggdrasil-network/yggdrasil-go/src/util"
|
||||
"github.com/RiV-chain/RiV-mesh/src/address"
|
||||
//"github.com/RiV-chain/RiV-mesh/src/util"
|
||||
)
|
||||
|
||||
const default_timeout = 6 * time.Second
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue