status-go/vendor/github.com/libp2p/go-libp2p-interface-connmgr/null.go

27 lines
961 B
Go

package ifconnmgr
import (
"context"
inet "github.com/libp2p/go-libp2p-net"
peer "github.com/libp2p/go-libp2p-peer"
ma "github.com/multiformats/go-multiaddr"
)
type NullConnMgr struct{}
func (_ NullConnMgr) TagPeer(peer.ID, string, int) {}
func (_ NullConnMgr) UntagPeer(peer.ID, string) {}
func (_ NullConnMgr) GetTagInfo(peer.ID) *TagInfo { return &TagInfo{} }
func (_ NullConnMgr) TrimOpenConns(context.Context) {}
func (_ NullConnMgr) Notifee() inet.Notifiee { return &cmNotifee{} }
type cmNotifee struct{}
func (nn *cmNotifee) Connected(n inet.Network, c inet.Conn) {}
func (nn *cmNotifee) Disconnected(n inet.Network, c inet.Conn) {}
func (nn *cmNotifee) Listen(n inet.Network, addr ma.Multiaddr) {}
func (nn *cmNotifee) ListenClose(n inet.Network, addr ma.Multiaddr) {}
func (nn *cmNotifee) OpenedStream(inet.Network, inet.Stream) {}
func (nn *cmNotifee) ClosedStream(inet.Network, inet.Stream) {}