mirror of
https://github.com/status-im/status-go.git
synced 2025-02-02 18:05:07 +00:00
25 lines
428 B
Go
25 lines
428 B
Go
|
package ifconnmgr
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"time"
|
||
|
|
||
|
inet "github.com/libp2p/go-libp2p-net"
|
||
|
peer "github.com/libp2p/go-libp2p-peer"
|
||
|
)
|
||
|
|
||
|
type ConnManager interface {
|
||
|
TagPeer(peer.ID, string, int)
|
||
|
UntagPeer(peer.ID, string)
|
||
|
GetTagInfo(peer.ID) *TagInfo
|
||
|
TrimOpenConns(context.Context)
|
||
|
Notifee() inet.Notifiee
|
||
|
}
|
||
|
|
||
|
type TagInfo struct {
|
||
|
FirstSeen time.Time
|
||
|
Value int
|
||
|
Tags map[string]int
|
||
|
Conns map[string]time.Time
|
||
|
}
|