func ConcurrentConnects() uint {
	return concurrentConnects
}
ConcurrentConnects returns the maximum number of concurrent connects.
package scotty
import (
	"github.com/Symantec/scotty/hostid"
	"github.com/Symantec/scotty/metrics"
	"github.com/Symantec/scotty/sources"
	"sync"
	"time"
)
type Status int
const (
	FailedToConnect Status = -1 - iota
	FailedToPoll
)
const (
	Unknown Status = iota
	WaitingToConnect
	Connecting
	WaitingToPoll
	Polling
	Synced
)
func (s Status) String() string {
	switch s {
	case Unknown:
		return ""
	case WaitingToConnect:
		return "waiting to connect"
	case Connecting:
		return "connecting"
	case WaitingToPoll:
		return "waiting to poll"
	case Polling:
		return "polling"
	case Synced:
		return "synced"
	case FailedToConnect:
		return "failed to connect"
	case FailedToPoll:
		return "failed to poll"
	default:
		return ""
	}
}
type State struct {
	timestamp             time.Time
	sweepStartTime        time.Time
	waitToConnectDuration time.Duration
	connectDuration       time.Duration
	waitToPollDuration    time.Duration
	pollDuration          time.Duration
	connectorName         string
	status                Status
}
func (s *State) ConnectorName() string {
	return s.connectorName
}
func (s *State) Timestamp() time.Time {
	return s.timestamp
}
func (s *State) SweepStartTime() time.Time {
	return s.sweepStartTime
}
func (s *State) TimeSpentWaitingToConnect() time.Duration {
	return s.waitToConnectDuration
}
func (s *State) TimeSpentConnecting() time.Duration {
	return s.connectDuration
}
func (s *State) TimeSpentWaitingToPoll() time.Duration {
	return s.waitToPollDuration
}
func (s *State) TimeSpentPolling() time.Duration {
	return s.pollDuration
}
func (s *State) Status() Status {
	return s.status
}
type Logger interface {
	LogResponse(
		e *Endpoint, response metrics.List, timestamp time.Time) error
	LogError(e *Endpoint, err error, state *State)
	LogStateChange(e *Endpoint, oldState, newState *State)
}
type Endpoint struct {
	hostId         *hostid.HostID
	name           string
	conn           sources.ResourceConnector
	onePollAtATime chan bool
	state        *State
	errored      bool
	lock         sync.Mutex
	isTls        bool
	resourcePort uint
	resource     sources.Resource
}
func NewEndpointWithConnector(
	hostId *hostid.HostID, appName string, connector sources.Connector) *Endpoint {
	return newEndpoint(hostId, appName, connector)
}
func (e *Endpoint) HostName() string {
	return e.hostId.HostName
}
func (e *Endpoint) IpAddress() string {
	return e.hostId.IPAddress
}
func (e *Endpoint) AppName() string {
	return e.name
}
func (e *Endpoint) ConnectorName() string {
	return e.conn.Name()
}
func (e *Endpoint) Poll(
	sweepStartTime time.Time, isTls bool, port uint, logger Logger) {
	e.poll(sweepStartTime, isTls, port, logger)
}
func SetConcurrentPolls(x uint) {
	setConcurrentPolls(x)
}
func ConcurrentPolls() uint {
	return concurrentPolls
}
func SetConcurrentConnects(x uint) {
	setConcurrentConnects(x)
}