Exemple #1
0
func (a *activeInactiveListType) Visit(
	s *store.Store, endpoint interface{}) error {
	a.activeFound = false
	s.LatestByEndpoint(endpoint, a)
	scottyEndpoint := endpoint.(*scotty.Endpoint)
	hostPortStr := fmt.Sprintf(
		"%s:%d", scottyEndpoint.HostName(), scottyEndpoint.Port())
	if a.activeFound {
		a.Active[hostPortStr] = true
	} else {
		a.Inactive[hostPortStr] = true
	}
	return nil
}