Documentation ¶
Index ¶
- func GenerateConfigJSON() []byte
- func GetVersion() string
- type MobileLogger
- type Yggdrasil
- func (m *Yggdrasil) GetAddressString() string
- func (m *Yggdrasil) GetMTU() int
- func (m *Yggdrasil) GetPathsJSON() (result string)
- func (m *Yggdrasil) GetPeersJSON() (result string)
- func (m *Yggdrasil) GetPublicKeyString() string
- func (m *Yggdrasil) GetRoutingEntries() int
- func (m *Yggdrasil) GetSubnetString() string
- func (m *Yggdrasil) GetTreeJSON() (result string)
- func (m *Yggdrasil) Recv() ([]byte, error)
- func (m *Yggdrasil) RecvBuffer(buf []byte) (int, error)
- func (m *Yggdrasil) RetryPeersNow()
- func (m *Yggdrasil) Send(p []byte) error
- func (m *Yggdrasil) SendBuffer(p []byte, length int) error
- func (m *Yggdrasil) StartAutoconfigure() error
- func (m *Yggdrasil) StartJSON(configjson []byte) error
- func (m *Yggdrasil) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfigJSON ¶
func GenerateConfigJSON() []byte
GenerateConfigJSON generates mobile-friendly configuration in JSON format
func GetVersion ¶
func GetVersion() string
Types ¶
type MobileLogger ¶
type MobileLogger struct { }
type Yggdrasil ¶
type Yggdrasil struct {
// contains filtered or unexported fields
}
Yggdrasil mobile package is meant to "plug the gap" for mobile support, as Gomobile will not create headers for Swift/Obj-C etc if they have complex (non-native) types. Therefore for iOS we will expose some nice simple functions. Note that in the case of iOS we handle reading/writing to/from TUN in Swift therefore we use the "dummy" TUN interface instead.
func (*Yggdrasil) GetAddressString ¶
GetAddressString gets the node's IPv6 address
func (*Yggdrasil) GetPathsJSON ¶ added in v0.5.0
func (*Yggdrasil) GetPeersJSON ¶
func (*Yggdrasil) GetPublicKeyString ¶
GetPublicKeyString gets the node's public key in hex form
func (*Yggdrasil) GetRoutingEntries ¶ added in v0.5.0
GetRoutingEntries gets the number of entries in the routing table
func (*Yggdrasil) GetSubnetString ¶
GetSubnetString gets the node's IPv6 subnet in CIDR notation
func (*Yggdrasil) GetTreeJSON ¶ added in v0.5.0
func (*Yggdrasil) Recv ¶
Recv waits for and reads a packet coming from Yggdrasil. It will be a fully formed IPv6 packet
func (*Yggdrasil) RecvBuffer ¶ added in v0.4.7
Recv waits for and reads a packet coming from Yggdrasil to given buffer, returning size of packet
func (*Yggdrasil) RetryPeersNow ¶ added in v0.4.7
func (m *Yggdrasil) RetryPeersNow()
Retry resets the peer connection timer and tries to dial them immediately.
func (*Yggdrasil) SendBuffer ¶ added in v0.4.7
Send sends a packet from given buffer to Yggdrasil. From first byte up to length.
func (*Yggdrasil) StartAutoconfigure ¶
StartAutoconfigure starts a node with a randomly generated config