mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 18:37:26 +08:00
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete * 2.1.0 main node rollup
26 lines
1.0 KiB
Go
26 lines
1.0 KiB
Go
package connmgr
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/libp2p/go-libp2p/core/network"
|
|
"github.com/libp2p/go-libp2p/core/peer"
|
|
)
|
|
|
|
// NullConnMgr is a ConnMgr that provides no functionality.
|
|
type NullConnMgr struct{}
|
|
|
|
var _ ConnManager = (*NullConnMgr)(nil)
|
|
|
|
func (NullConnMgr) TagPeer(peer.ID, string, int) {}
|
|
func (NullConnMgr) UntagPeer(peer.ID, string) {}
|
|
func (NullConnMgr) UpsertTag(peer.ID, string, func(int) int) {}
|
|
func (NullConnMgr) GetTagInfo(peer.ID) *TagInfo { return &TagInfo{} }
|
|
func (NullConnMgr) TrimOpenConns(_ context.Context) {}
|
|
func (NullConnMgr) Notifee() network.Notifiee { return network.GlobalNoopNotifiee }
|
|
func (NullConnMgr) Protect(peer.ID, string) {}
|
|
func (NullConnMgr) Unprotect(peer.ID, string) bool { return false }
|
|
func (NullConnMgr) IsProtected(peer.ID, string) bool { return false }
|
|
func (NullConnMgr) CheckLimit(_ GetConnLimiter) error { return nil }
|
|
func (NullConnMgr) Close() error { return nil }
|