Documentation
¶
Index ¶
- Constants
- Variables
- func IPV4Only(ip net.IP) bool
- type Filter
- type NodeConfig
- type Peers
- type Ranges
- type YggServer
- func (s *YggServer) Address() (net.IP, error)
- func (s *YggServer) Ensure(z *zinit.Client, ns string) error
- func (s *YggServer) Gateway() (net.IPNet, error)
- func (s *YggServer) NodeID() (ed25519.PublicKey, error)
- func (s *YggServer) Reload(z *zinit.Client) error
- func (s *YggServer) Restart(z *zinit.Client) error
- func (s *YggServer) Subnet() (net.IPNet, error)
- func (s *YggServer) SubnetFor(b []byte) (net.IPNet, error)
- func (s *YggServer) Tun() string
- type YggdrasilNamespace
Constants ¶
View Source
const ( YggListenTCP = 9943 YggListenTLS = 9944 YggListenLinkLocal = 9945 YggIface = "ygg0" )
List of port used by yggdrasil
View Source
const (
// YggNSInf inside the namespace
YggNSInf = "nygg6"
)
Variables ¶
Functions ¶
Types ¶
type NodeConfig ¶
type NodeConfig config.NodeConfig
NodeConfig wrapper around yggdrasil node config
func GenerateConfig ¶
func GenerateConfig(privateKey ed25519.PrivateKey) (cfg NodeConfig)
GenerateConfig creates a new yggdrasil configuration and generate the box and signing key from the ed25519 Private key of the node this creates a mapping between a yggdrasil identity and the TFGrid identity
type YggServer ¶
type YggServer struct {
// contains filtered or unexported fields
}
YggServer represent a yggdrasil server
func EnsureYggdrasil ¶
func EnsureYggdrasil(ctx context.Context, privateKey ed25519.PrivateKey, ns YggdrasilNamespace) (*YggServer, error)
func NewYggServer ¶
func NewYggServer(cfg *NodeConfig) *YggServer
NewYggServer create a new yggdrasil Server
func (*YggServer) Gateway ¶
Gateway return the first IP of the 300::/64 subnet allocated by yggdrasil
type YggdrasilNamespace ¶
type YggdrasilNamespace interface { Name() string // IsIPv4Only checks if namespace has NO public ipv6 on any of its interfaces IsIPv4Only() (bool, error) // GetIPs return a list of all IPv6 inside this namespace. GetIPs() ([]net.IPNet, error) // SetYggIP sets the ygg ipv6 on the nygg6 iterface. SetYggIP(ip net.IPNet, gw net.IP) error }
func NewYggdrasilNamespace ¶
func NewYggdrasilNamespace(ns string) (YggdrasilNamespace, error)
Click to show internal directories.
Click to hide internal directories.