Documentation
¶
Index ¶
- func GenerateConfigJSON() []byte
- func GetVersion() string
- type ConfigSummary
- type MobileLogger
- type UQDA
- func (m *UQDA) GetAddressString() string
- func (m *UQDA) GetMTU() int
- func (m *UQDA) GetPathsJSON() (result string)
- func (m *UQDA) GetPeersJSON() (result string)
- func (m *UQDA) GetPublicKeyString() string
- func (m *UQDA) GetRoutingEntries() int
- func (m *UQDA) GetSubnetString() string
- func (m *UQDA) GetTreeJSON() (result string)
- func (m *UQDA) Recv() ([]byte, error)
- func (m *UQDA) RecvBuffer(buf []byte) (int, error)
- func (m *UQDA) RetryPeersNow()
- func (m *UQDA) Send(p []byte) error
- func (m *UQDA) SendBuffer(p []byte, length int) error
- func (m *UQDA) StartAutoconfigure() error
- func (m *UQDA) StartJSON(configjson []byte) error
- func (m *UQDA) 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 ConfigSummary ¶
func SummaryForConfig ¶
func SummaryForConfig(b []byte) *ConfigSummary
type MobileLogger ¶
type MobileLogger struct {
}
type UQDA ¶ added in v0.1.0
type UQDA struct {
// contains filtered or unexported fields
}
UQDA 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 (*UQDA) GetAddressString ¶ added in v0.1.0
GetAddressString gets the node's IPv6 address
func (*UQDA) GetMTU ¶ added in v0.1.0
GetMTU returns the configured node MTU. This must be called AFTER Start.
func (*UQDA) GetPathsJSON ¶ added in v0.1.0
func (*UQDA) GetPeersJSON ¶ added in v0.1.0
func (*UQDA) GetPublicKeyString ¶ added in v0.1.0
GetPublicKeyString gets the node's public key in hex form
func (*UQDA) GetRoutingEntries ¶ added in v0.1.0
GetRoutingEntries gets the number of entries in the routing table
func (*UQDA) GetSubnetString ¶ added in v0.1.0
GetSubnetString gets the node's IPv6 subnet in CIDR notation
func (*UQDA) GetTreeJSON ¶ added in v0.1.0
func (*UQDA) Recv ¶ added in v0.1.0
Recv waits for and reads a packet coming from UQDA. It will be a fully formed IPv6 packet
func (*UQDA) RecvBuffer ¶ added in v0.1.0
Recv waits for and reads a packet coming from UQDA to given buffer, returning size of packet
func (*UQDA) RetryPeersNow ¶ added in v0.1.0
func (m *UQDA) RetryPeersNow()
Retry resets the peer connection timer and tries to dial them immediately.
func (*UQDA) Send ¶ added in v0.1.0
Send sends a packet to UQDA. It should be a fully formed IPv6 packet
func (*UQDA) SendBuffer ¶ added in v0.1.0
Send sends a packet from given buffer to UQDA. From first byte up to length.
func (*UQDA) StartAutoconfigure ¶ added in v0.1.0
StartAutoconfigure starts a node with a randomly generated config