go-libp2p-resource-manager/allowlist.go

17 lines
549 B
Go
Raw Permalink Normal View History

package rcmgr
import (
2022-08-18 20:21:11 +08:00
rcmgr "github.com/libp2p/go-libp2p/p2p/host/resource-manager"
"github.com/multiformats/go-multiaddr"
)
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.Allowlist instead
type Allowlist = rcmgr.Allowlist
2022-06-28 06:47:51 +08:00
// WithAllowlistedMultiaddrs sets the multiaddrs to be in the allowlist
2022-08-18 20:21:11 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/p2p/host/resource-manager.WithAllowlistedMultiaddrs instead
2022-06-28 06:47:51 +08:00
func WithAllowlistedMultiaddrs(mas []multiaddr.Multiaddr) Option {
2022-08-18 20:21:11 +08:00
return rcmgr.WithAllowlistedMultiaddrs(mas)
}