Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DomainFromIP ¶
DomainFromIP derives a meshname subdomain for the authoritative DNS server address
Example ¶
test_ip := net.ParseIP("203:f15a:c323:83aa:cdb0:2e84:56b3:e85c") fmt.Println(meshname.DomainFromIP(&test_ip))
Output: aib7cwwdeob2vtnqf2cfnm7ilq
func IPFromDomain ¶
IPFromDomain derives authoritative DNS server address from the meshname subdomain
Example ¶
test_subdomain := "aib7cwwdeob2vtnqf2cfnm7ilq" if ip, err := meshname.IPFromDomain(&test_subdomain); err == nil { fmt.Println(ip) }
Output: 203:f15a:c323:83aa:cdb0:2e84:56b3:e85c
Types ¶
type MeshnameServer ¶
type MeshnameServer struct {
// contains filtered or unexported fields
}
func New ¶
func New(log *log.Logger, listenAddr string, networks map[string]*net.IPNet, enableMeshIP bool) *MeshnameServer
New is a constructor for MeshnameServer
func (*MeshnameServer) IsStarted ¶
func (s *MeshnameServer) IsStarted() bool
func (*MeshnameServer) Start ¶
func (s *MeshnameServer) Start() error
func (*MeshnameServer) Stop ¶
func (s *MeshnameServer) Stop()
Click to show internal directories.
Click to hide internal directories.