TOO LATE
thoughts so far :
- Prioritisation of peers
- how about numeric values? (Low) 1,2,3, ... 9? (High), -1 === 'BLOCK'
- avoids magic strings ... mind you redux is all about that magic!
- Where does this fit in the stack?
- I'm new to this, so am surprised when init takes some connectToPeer? is this for testing
- does this manage things automatically for me? The text "that manages making connections to other sbots" makes me think it foes, but the features suggest this is a providing accessible methods for managing connections myself ???
- Does this follow the 'instantiation pattern?
- start and instance
var manager = require('sbot-connection-manager')(opts)
- use the instance:
manager.startInitialSync()
- start and instance
- I've become a real big fan of methods nest in 'domains', as I think this makes it easier to clearly group concerns, and provide shorter and more legible names e.g. :
manager.initialSync.start()
,manager.initialSync.stop()
manager.peers.setPriority
,manager.peers.add
,manager.peers.obs
manager.connections.start()
,manager.connections.seLifetime
,manager.connections.peerConnected