Versions in this module Expand all Collapse all v1 v1.1.0 Jul 9, 2026 Changes in this version + const MyListenTCP + const MyceliumNSInf + var MyRange = net.IPNet + func IPV4Only(ip net.IP) bool + type Filter func(ip net.IP) bool + func Exclude(ranges Ranges) Filter + func Include(ranges Ranges) Filter + type MyceliumInspection struct + Address net.IP + PublicKey string + func (m *MyceliumInspection) Gateway() (gw net.IPNet, err error) + func (m *MyceliumInspection) IP() net.IP + func (m *MyceliumInspection) IPFor(b []byte) (net.IPNet, error) + func (m *MyceliumInspection) Subnet() (subnet net.IPNet, err error) + type MyceliumNamespace interface + GetIPs func() ([]net.IPNet, error) + IsIPv4Only func() (bool, error) + Name func() string + SetMyIP func(ip net.IPNet, gw net.IP) error + func NewMyNamespace(ns string) (MyceliumNamespace, error) + type MyceliumServer struct + func EnsureMycelium(ctx context.Context, privateKey ed25519.PrivateKey, ns MyceliumNamespace) (*MyceliumServer, error) + func NewMyceliumServer(cfg *NodeConfig) *MyceliumServer + func (s *MyceliumServer) Ensure(z *zinit.Client, ns string) error + func (s *MyceliumServer) InspectMycelium() (inspection MyceliumInspection, err error) + func (s *MyceliumServer) Reload(z *zinit.Client) error + func (s *MyceliumServer) Restart(z *zinit.Client) error + func (s *MyceliumServer) Tun() string + type NodeConfig struct + KeyFile string + Peers []string + TunName string + func GenerateConfig(privateKey ed25519.PrivateKey) (cfg NodeConfig) + func (n *NodeConfig) AssignPeers(ctx context.Context, filter ...Filter) error + type Peers []string + func FindPeers(ctx context.Context, filter ...Filter) (Peers, error) + func (p Peers) Ups(filter ...Filter) (Peers, error) + type Ranges []net.IPNet