func (e *EndpointStore) AllWithStore() (
	result []*Endpoint, astore *store.Store) {
	return e.allWithStore()
}
AllWithStore returns all endpoints along with the metric store
package machine
import (
	"github.com/Symantec/Dominator/lib/mdb"
	"github.com/Symantec/scotty"
	"github.com/Symantec/scotty/application"
	"github.com/Symantec/scotty/awsinfo"
	"github.com/Symantec/scotty/namesandports"
	"github.com/Symantec/scotty/store"
	"sort"
	"sync"
	"time"
)
type EndpointObservation struct {
	SeqNo uint64
	Endpoints namesandports.NamesAndPorts
}
type EndpointObservations struct {
	mu   sync.Mutex
	data map[string]EndpointObservation
}
func NewEndpointObservations() *EndpointObservations {
	return &EndpointObservations{data: make(map[string]EndpointObservation)}
}
func (e *EndpointObservations) Save(
	hostName string, namesAndPorts namesandports.NamesAndPorts) {
	e.save(hostName, namesAndPorts)
}
func (e *EndpointObservations) GetAll() map[string]EndpointObservation {
	return e.getAll()
}
func (e *EndpointObservations) MaybeAddApp(hostName, appName string, port uint) {
	e.maybeAddApp(hostName, appName, port)
}
type Machine struct {
	Host string
	Region string
	IpAddress string
	Active bool
	Aws *awsinfo.AwsInfo
}
func (m *Machine) AccountId() string {
	if m.Aws != nil {
		return m.Aws.AccountId
	}
	return ""
}
func (m *Machine) InstanceId() string {
	if m.Aws != nil {
		return m.Aws.InstanceId
	}
	return ""
}
func (m *Machine) CloudHealth() bool {
	if m.Aws != nil {
		return m.Aws.CloudHealth
	}
	return false
}
func (m *Machine) CloudWatchStr() string {
	if m.Aws != nil && m.Aws.CloudWatch != 0 {
		if m.Aws.CloudWatchMemoryOnly {
			return m.Aws.CloudWatch.String() + "M"
		}
		return m.Aws.CloudWatch.String()
	}
	return ""
}
type Endpoint struct {
	M   *Machine
	App *application.Application
}
func (e *Endpoint) Active() bool {
	return e.M.Active && e.App.Active
}
type EndpointStore struct {
	config            awsinfo.Config
	countToInactivate int
	statusChangeLock sync.Mutex
	mu               sync.Mutex
	astore           *store.Store
	byHost           map[string]*machineDataType
}
func NewEndpointStore(
	astore *store.Store,
	config awsinfo.Config,
	countToInactivate int) *EndpointStore {
	return &EndpointStore{
		config:            config,
		astore:            astore,
		countToInactivate: countToInactivate,
		byHost:            make(map[string]*machineDataType),
	}
}
func (e *EndpointStore) UpdateState(
	ep *scotty.Endpoint, newState *scotty.State) {
	e.updateState(ep, newState)
}
func (e *EndpointStore) ReportError(
	ep *scotty.Endpoint, err error, ts time.Time) {
	e.reportError(ep, err, ts)
}
func (e *EndpointStore) LogChangedMetricCount(
	ep *scotty.Endpoint, metricCount uint) {
	e.logChangedMetricCount(ep, metricCount)
}
func (e *EndpointStore) UpdateMachines(
	timestamp float64,
	activeHosts []mdb.Machine) {
	e.updateMachines(timestamp, activeHosts)
}