diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-07-06 14:51:59 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-07-06 14:51:59 +0100 |
commit | 6c4eabbe92b607433766bd4b5ca27c1dd0b3480e (patch) | |
tree | 22da37e36786df41a51a0aa4f1e3bd114a158888 /build | |
parent | ea9df46c70a1b806c11198a1272aac99dc8b62f4 (diff) |
Updated functionality for updating Yggdrasil config in iOS demo
Diffstat (limited to 'build')
-rw-r--r-- | build/gobind/monolith.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/build/gobind/monolith.go b/build/gobind/monolith.go index bf4c020b..b73e47f8 100644 --- a/build/gobind/monolith.go +++ b/build/gobind/monolith.go @@ -39,7 +39,23 @@ func (m *DendriteMonolith) PeerCount() int { return m.YggdrasilNode.PeerCount() } -func (m *DendriteMonolith) Start() { +func (m *DendriteMonolith) SetMulticastEnabled(enabled bool) { + m.YggdrasilNode.SetMulticastEnabled(enabled) +} + +func (m *DendriteMonolith) SetStaticPeer(uri string) error { + return m.YggdrasilNode.SetStaticPeer(uri) +} + +func (m *DendriteMonolith) DisconnectNonMulticastPeers() { + m.YggdrasilNode.DisconnectNonMulticastPeers() +} + +func (m *DendriteMonolith) DisconnectMulticastPeers() { + m.YggdrasilNode.DisconnectMulticastPeers() +} + +func (m *DendriteMonolith) Start(staticPeer string, enableMulticast bool) { logger := logrus.Logger{ Out: BindLogger{}, } @@ -51,7 +67,7 @@ func (m *DendriteMonolith) Start() { panic(err) } - ygg, err := yggconn.Setup("dendrite", "", m.StorageDirectory) + ygg, err := yggconn.Setup("dendrite", staticPeer, m.StorageDirectory, enableMulticast) if err != nil { panic(err) } |