mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-28 08:47:42 +08:00
peerstore: re-export ErrNotFound
This is to avoid having to import ds elsewhere.
This commit is contained in:
@ -9,6 +9,10 @@ import (
|
|||||||
ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
|
ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/datastore.go"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ErrNotFound signals a peer wasn't found. this is here to avoid having to
|
||||||
|
// leak the ds abstraction to clients of Peerstore, just for the error.
|
||||||
|
var ErrNotFound = ds.ErrNotFound
|
||||||
|
|
||||||
// Peerstore provides a threadsafe collection for peers.
|
// Peerstore provides a threadsafe collection for peers.
|
||||||
type Peerstore interface {
|
type Peerstore interface {
|
||||||
Get(ID) (*Peer, error)
|
Get(ID) (*Peer, error)
|
||||||
|
Reference in New Issue
Block a user