status-go/vendor/github.com/libp2p/go-libp2p-peerstore/peerinfo.go

23 lines
721 B
Go
Raw Normal View History

package peerstore
import (
2019-06-09 07:24:20 +00:00
core "github.com/libp2p/go-libp2p-core/peer"
ma "github.com/multiformats/go-multiaddr"
)
2019-06-09 07:24:20 +00:00
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.Info instead.
type PeerInfo = core.AddrInfo
2019-06-09 07:24:20 +00:00
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrInvalidAddr instead.
var ErrInvalidAddr = core.ErrInvalidAddr
2019-06-09 07:24:20 +00:00
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoFromP2pAddr instead.
func InfoFromP2pAddr(m ma.Multiaddr) (*core.AddrInfo, error) {
return core.AddrInfoFromP2pAddr(m)
}
2019-06-09 07:24:20 +00:00
// Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoToP2pAddrs instead.
func InfoToP2pAddrs(pi *core.AddrInfo) ([]ma.Multiaddr, error) {
return core.AddrInfoToP2pAddrs(pi)
}