connmgr

package module
v0.3.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2018 License: MIT Imports: 9 Imported by: 0

README

go-libp2p-connmgr

Coverage Status Travis CI

A package to help manage connections in go-libp2p

Table of Contents

Install

make install

Examples

// TODO:

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Whyrusleeping

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicConnMgr added in v0.3.3

type BasicConnMgr struct {
	// contains filtered or unexported fields
}

func NewConnManager

func NewConnManager(low, hi int, grace time.Duration) *BasicConnMgr

func (*BasicConnMgr) GetInfo added in v0.3.3

func (cm *BasicConnMgr) GetInfo() CMInfo

func (*BasicConnMgr) GetTagInfo added in v0.3.3

func (cm *BasicConnMgr) GetTagInfo(p peer.ID) *ifconnmgr.TagInfo

func (*BasicConnMgr) Notifee added in v0.3.3

func (cm *BasicConnMgr) Notifee() inet.Notifiee

func (*BasicConnMgr) TagPeer added in v0.3.3

func (cm *BasicConnMgr) TagPeer(p peer.ID, tag string, val int)

func (*BasicConnMgr) TrimOpenConns added in v0.3.3

func (cm *BasicConnMgr) TrimOpenConns(ctx context.Context)

func (*BasicConnMgr) UntagPeer added in v0.3.3

func (cm *BasicConnMgr) UntagPeer(p peer.ID, tag string)

type CMInfo added in v0.3.3

type CMInfo struct {
	LowWater    int
	HighWater   int
	LastTrim    time.Time
	GracePeriod time.Duration
	ConnCount   int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL