func NewManager(d Dialer, network, address string, after AfterFunc, logger log.Logger) *Manager {
	m := &Manager{
		dialer:  d,
		network: network,
		address: address,
		after:   after,
		logger:  logger,
		takec: make(chan net.Conn),
		putc:  make(chan error),
	}
	go m.loop()
	return m
}
NewManager returns a connection manager using the passed Dialer, network, and
address. The AfterFunc is used to control exponential backoff and retries.
The logger is used to log errors; pass a log.NopLogger if you don't care to
receive them. For normal use, prefer NewDefaultManager.
package conn
import (
	"errors"
	"net"
	"time"
	"github.com/go-kit/kit/log"
)
type Dialer func(network, address string) (net.Conn, error)
type AfterFunc func(time.Duration) <-chan time.Time
type Manager struct {
	dialer  Dialer
	network string
	address string
	after   AfterFunc
	logger  log.Logger
	takec chan net.Conn
	putc  chan error
}