Documentation
¶
Overview ¶
store package implements how to output the log, and how to restore from the log file.
Index ¶
- Constants
- Variables
- func CompareRecords(x, y api.Record) bool
- func IncidentIsContinued(i *api.Incident, r api.Record) bool
- func NewIncident(r api.Record) *api.Incident
- type IncidentHandler
- type ProbeHistory
- type ProbeHistoryMap
- type Store
- func (s *Store) AddTarget(target *url.URL)
- func (s *Store) Close() error
- func (s *Store) CurrentIncidents() []*api.Incident
- func (s *Store) Errors() (healthy bool, messages []string)
- func (s *Store) IncidentHistory() []*api.Incident
- func (s *Store) MakeReport() api.Report
- func (s *Store) ProbeHistory() []*ProbeHistory
- func (s *Store) Report(r api.Record)
- func (s *Store) ReportInternalError(scope, message string)
- func (s *Store) Restore() error
Constants ¶
View Source
const ( PROBE_HISTORY_LEN = 40 INCIDENT_HISTORY_LEN = 10 )
Variables ¶
View Source
var (
LogRestoreBytes int64 = 100 * 1024 * 1024
)
Functions ¶
func CompareRecords ¶
Types ¶
type IncidentHandler ¶
type ProbeHistory ¶
type ProbeHistory struct {
Target *url.URL
Records []api.Record
// contains filtered or unexported fields
}
func (ProbeHistory) MakeReport ¶
func (ph ProbeHistory) MakeReport() api.ProbeHistory
type ProbeHistoryMap ¶
type ProbeHistoryMap map[string]*ProbeHistory
func (ProbeHistoryMap) Append ¶
func (hs ProbeHistoryMap) Append(r api.Record)
type Store ¶
type Store struct {
Path string
Console io.Writer
OnIncident []IncidentHandler
IncidentCount int
// contains filtered or unexported fields
}
func (*Store) CurrentIncidents ¶
func (*Store) IncidentHistory ¶
func (*Store) MakeReport ¶
func (*Store) ProbeHistory ¶
func (s *Store) ProbeHistory() []*ProbeHistory
func (*Store) ReportInternalError ¶
Click to show internal directories.
Click to hide internal directories.