2016-05-06 08:44:39 -04:00
|
|
|
package netdb
|
|
|
|
|
|
|
|
import (
|
2016-07-03 08:29:21 -04:00
|
|
|
"github.com/hkparker/go-i2p/lib/common"
|
2016-05-06 08:44:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
// i2p network database, storage of i2p RouterInfos
|
|
|
|
type NetworkDatabase interface {
|
|
|
|
// obtain a RouterInfo by its hash
|
|
|
|
// return a channel that gives 1 RouterInfo or nil if the RouterInfo cannot be found
|
|
|
|
GetRouterInfo(hash common.Hash) chan *common.RouterInfo
|
|
|
|
// store a router info locally
|
|
|
|
StoreRouterInfo(ri *common.RouterInfo)
|
|
|
|
}
|