Documentation ¶
Index ¶
- Variables
- type Option
- type PeerListManager
- func (o PeerListManager) ConnCheckFrequency(connCheckFrequency time.Duration) Option
- func (o PeerListManager) ConnCheckTimeout(connCheckTimeout time.Duration) Option
- func (o PeerListManager) Logger(logger *zap.Logger) Option
- func (o PeerListManager) MinPeers(minPeers int) Option
- func (m *PeerListManager) Stop()
Constants ¶
This section is empty.
Variables ¶
View Source
var Options = options{}
Options is a factory for different options.
Functions ¶
This section is empty.
Types ¶
type PeerListManager ¶
type PeerListManager struct {
// contains filtered or unexported fields
}
PeerListManager uses a discovery.Notifier to manage tchannel.PeerList by making sure that there are connections to at least minPeers.
func New ¶
func New( peerList *tchannel.PeerList, discoverer discovery.Discoverer, notifier discovery.Notifier, opts ...Option, ) (*PeerListManager, error)
New creates new PeerListManager.
func (PeerListManager) ConnCheckFrequency ¶
ConnCheckFrequency changes how frequently manager will check for MinPeers connections.
func (PeerListManager) ConnCheckTimeout ¶
ConnCheckTimeout changes the timeout used when establishing new connections.
func (PeerListManager) MinPeers ¶
MinPeers changes min number of open connections to peers that the manager will try to maintain.
func (*PeerListManager) Stop ¶
func (m *PeerListManager) Stop()
Stop shuts down the manager. It blocks until both bg go-routines exit.
Click to show internal directories.
Click to hide internal directories.