package types

import (
	"git.loafle.net/overflow/overflow_probe/discovery/discovery/types/timestamp"
	"sync"
)

type DiscoveryHistory struct {
	ID        int                 `json:"id,omitempty"`
	StartDate timestamp.Timestamp `json:"startDate"`
	EndDate   timestamp.Timestamp `json:"endDate"`
	Result    bool                `json:"result"`
	Zone      *DiscoveryZone      `json:"zone"`
}

func NewDiscoveryHistory(zone *DiscoveryZone) DiscoveryHistory {
	return DiscoveryHistory{
		Zone:      zone,
		StartDate: timestamp.Now(),
	}
}

type DiscoveryMgr struct {
	Stop        chan bool
	DiscoveryWg *sync.WaitGroup
	Zone        *DiscoveryZone
}
