mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-22 12:50:07 +08:00
20 lines
697 B
Go
20 lines
697 B
Go
package pstoremem
|
|
|
|
import (
|
|
pstore "github.com/libp2p/go-libp2p/core/peerstore"
|
|
"github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem"
|
|
)
|
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.ProtoBookOption instead
|
|
type ProtoBookOption = pstoremem.ProtoBookOption
|
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.WithMaxProtocols instead
|
|
func WithMaxProtocols(num int) ProtoBookOption {
|
|
return pstoremem.WithMaxProtocols(num)
|
|
}
|
|
|
|
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewProtoBook instead
|
|
func NewProtoBook(opts ...ProtoBookOption) (pstore.ProtoBook, error) {
|
|
return pstoremem.NewProtoBook(opts...)
|
|
}
|