File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 55 ma "github.com/multiformats/go-multiaddr"
66)
77
8- // WithAddrFilter is a Service option that enables multi address filtering.
9- // It allows to only allow a subset of observed addresses to the remote
8+ // WithAddrFilter is a Service option that enables multiaddress filtering.
9+ // It allows to only send a subset of observed addresses to the remote
1010// peer. E.g., only announce TCP or QUIC multi addresses instead of both.
1111// It also allows to only consider a subset of received multi addresses
1212// that remote peers announced to us.
@@ -19,12 +19,10 @@ func WithAddrFilter(maf AddrFilter) Option {
1919}
2020
2121// AddrFilter defines the interface for the multi address filtering.
22- // - FilterLocal is a function that filters the multi addresses that
23- // we send to the remote peer.
24- // - FilterRemote is a function that filters the multi addresses which
25- // we received from the remote peer.
2622type AddrFilter interface {
23+ // FilterLocal is a function that filters the multi addresses that we send to the remote peer.
2724 FilterLocal (remoteID peer.ID , maddrs []ma.Multiaddr ) []ma.Multiaddr
25+ // FilterRemote is a function that filters the multi addresses which we received from the remote peer.
2826 FilterRemote (remoteID peer.ID , maddrs []ma.Multiaddr ) []ma.Multiaddr
2927}
3028
You can’t perform that action at this time.
0 commit comments