Unexport/modify some interfaces to revive broken iOS/Android builds

This commit is contained in:
Neil Alexander 2019-03-30 00:09:35 +00:00
parent 4c0c3a23cb
commit 39baf7365c
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
7 changed files with 26 additions and 36 deletions

View file

@ -168,10 +168,15 @@ func BuildVersion() string {
// SetRouterAdapter instructs Yggdrasil to use the given adapter when starting
// the router. The adapter must implement the standard
// adapter.AdapterImplementation interface and should extend the adapter.Adapter
// adapter.adapterImplementation interface and should extend the adapter.Adapter
// struct.
func (c *Core) SetRouterAdapter(adapter AdapterImplementation) {
c.router.adapter = adapter
func (c *Core) SetRouterAdapter(adapter interface{}) {
// We do this because adapterImplementation is not a valid type for the
// gomobile bindings so we just ask for a generic interface and try to cast it
// to adapterImplementation instead
if a, ok := adapter.(adapterImplementation); ok {
c.router.adapter = a
}
}
// Start starts up Yggdrasil using the provided config.NodeConfig, and outputs