Documentation ¶
Index ¶
- type ConnManager
- func (*ConnManager) Close() error
- func (cm *ConnManager) ClosedStream(n network.Network, s network.Stream)
- func (cm *ConnManager) Connected(n network.Network, c network.Conn)
- func (cm *ConnManager) Disconnected(n network.Network, c network.Conn)
- func (*ConnManager) GetTagInfo(peer.ID) *connmgr.TagInfo
- func (cm *ConnManager) Listen(n network.Network, address ma.Multiaddr)
- func (cm *ConnManager) ListenClose(n network.Network, address ma.Multiaddr)
- func (cm *ConnManager) Notifee() network.Notifiee
- func (cm *ConnManager) OpenedStream(n network.Network, s network.Stream)
- func (*ConnManager) Protect(peer.ID, string)
- func (*ConnManager) TagPeer(peer.ID, string, int)
- func (*ConnManager) TrimOpenConns(ctx context.Context)
- func (*ConnManager) Unprotect(peer.ID, string) bool
- func (*ConnManager) UntagPeer(peer.ID, string)
- func (*ConnManager) UpsertTag(peer.ID, string, func(int) int)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnManager ¶
type ConnManager struct{}
ConnManager implement connmgr.ConnManager
func (*ConnManager) ClosedStream ¶
func (cm *ConnManager) ClosedStream(n network.Network, s network.Stream)
ClosedStream is called when a stream closed
func (*ConnManager) Connected ¶
func (cm *ConnManager) Connected(n network.Network, c network.Conn)
Connected is called when a connection opened
func (*ConnManager) Disconnected ¶
func (cm *ConnManager) Disconnected(n network.Network, c network.Conn)
Disconnected is called when a connection closed
func (*ConnManager) GetTagInfo ¶
func (*ConnManager) GetTagInfo(peer.ID) *connmgr.TagInfo
GetTagInfo peer
func (*ConnManager) Listen ¶
func (cm *ConnManager) Listen(n network.Network, address ma.Multiaddr)
Listen is called when network starts listening on an address
func (*ConnManager) ListenClose ¶
func (cm *ConnManager) ListenClose(n network.Network, address ma.Multiaddr)
ListenClose is called when network stops listening on an address
func (*ConnManager) Notifee ¶
func (cm *ConnManager) Notifee() network.Notifiee
Notifee is used to monitor changes to a connection
func (*ConnManager) OpenedStream ¶
func (cm *ConnManager) OpenedStream(n network.Network, s network.Stream)
OpenedStream is called when a stream opened
func (*ConnManager) TrimOpenConns ¶
func (*ConnManager) TrimOpenConns(ctx context.Context)
TrimOpenConns peer
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the main struct backing the transport and networking
func NewService ¶
func NewService(ctx *cli.Context) *Service
NewService reads the configuration and initializes the transport
Click to show internal directories.
Click to hide internal directories.