This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdeprecated.go
42 lines (30 loc) · 1.43 KB
/
deprecated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Deprecated: use github.com/libp2p/go-libp2p-core/routing instead.
package routing
import (
"context"
ci "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
core "github.com/libp2p/go-libp2p-core/routing"
)
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.ErrNotFound instead.
var ErrNotFound = core.ErrNotFound
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.ErrNotSupported instead.
var ErrNotSupported = core.ErrNotSupported
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.ContentRouting instead.
type ContentRouting = core.ContentRouting
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.PeerRouting instead.
type PeerRouting = core.PeerRouting
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.ValueStore instead.
type ValueStore = core.ValueStore
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.Routing instead.
type IpfsRouting = core.Routing
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.PubKeyFetcher instead.
type PubKeyFetcher = core.PubKeyFetcher
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.KeyForPublicKey instead.
func KeyForPublicKey(id peer.ID) string {
return core.KeyForPublicKey(id)
}
// Deprecated: use github.com/libp2p/go-libp2p-core/routing.GetPublicKey instead.
func GetPublicKey(r core.ValueStore, ctx context.Context, p peer.ID) (ci.PubKey, error) {
return core.GetPublicKey(r, ctx, p)
}