mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Unexport/modify some interfaces to revive broken iOS/Android builds
This commit is contained in:
parent
4c0c3a23cb
commit
39baf7365c
7 changed files with 26 additions and 36 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue