2016-08-17 09:19:56 -04:00
|
|
|
package bootstrap
|
|
|
|
|
2022-07-11 23:41:58 -04:00
|
|
|
import "github.com/go-i2p/go-i2p/lib/common/router_info"
|
2016-08-17 09:19:56 -04:00
|
|
|
|
|
|
|
// interface defining a way to bootstrap into the i2p network
|
|
|
|
type Bootstrap interface {
|
|
|
|
// get more peers for bootstrap
|
|
|
|
// try obtaining at most n router infos
|
|
|
|
// if n is 0 then try obtaining as many router infos as possible
|
|
|
|
// returns nil and error if we cannot fetch ANY router infos
|
|
|
|
// returns a channel that yields 1 slice of router infos containing n or fewer router infos, caller must close channel after use
|
2022-07-11 23:41:58 -04:00
|
|
|
GetPeers(n int) (chan []router_info.RouterInfo, error)
|
2016-08-17 09:19:56 -04:00
|
|
|
}
|