Documentation
¶
Index ¶
- Constants
- type Cache
- type CacheBase
- type CacheItem
- type CacheList
- type CacheListItem
- type HealthDBStorage
- func (self *HealthDBStorage) Close()
- func (self *HealthDBStorage) InsertInference(inf *pb.Inference) error
- func (self *HealthDBStorage) InsertRegistration(reg *dt.Registration) error
- func (self *HealthDBStorage) InsertReport(report *pb.Report) error
- func (self *HealthDBStorage) Open() (*sql.DB, error)
- func (self *HealthDBStorage) ReadRegistrations() (map[uint64]*dt.Registration, uint64)
- type HealthInferenceStorage
- func (self *HealthInferenceStorage) DumpInference() map[string]*pb.Inference
- func (self *HealthInferenceStorage) GetInference(subject string) *pb.Inference
- func (self *HealthInferenceStorage) InferReport(report *pb.Report) (*pb.Inference, error)
- func (self *HealthInferenceStorage) InferReportAsync(report *pb.Report) error
- func (self *HealthInferenceStorage) InferSubject(subject string) (*pb.Inference, error)
- func (self *HealthInferenceStorage) InferSubjectAsync(subject string) error
- func (self *HealthInferenceStorage) SetDB(db dt.HealthDB)
- func (self *HealthInferenceStorage) Start() error
- func (self *HealthInferenceStorage) Stop() error
- type InferMap
- type RawHealthStorage
- func (self *RawHealthStorage) AddReport(report *pb.Report, filter bool) (int, error)
- func (self *RawHealthStorage) AddSubject(subject string) bool
- func (self *RawHealthStorage) Dump()
- func (self *RawHealthStorage) DumpPanorama() map[string]*pb.Panorama
- func (self *RawHealthStorage) GC(ttl time.Duration, relative bool) map[string]uint32
- func (self *RawHealthStorage) GetLatestReport(subject string) *pb.Report
- func (self *RawHealthStorage) GetPanorama(subject string) *dt.ConcurrentPanorama
- func (self *RawHealthStorage) GetSubjects() map[string]time.Time
- func (self *RawHealthStorage) GetView(observer string, subject string) *pb.View
- func (self *RawHealthStorage) RemoveSubject(subject string, clean bool) bool
- func (self *RawHealthStorage) SetDB(db dt.HealthDB)
Constants ¶
View Source
const ( RETIRE_LIST_LEN = 100 EXPIRE_WRITE_LEN = 50 )
View Source
const ( DB_FILE = "deephealth.db" CREATE_STMT = `` /* 378-byte string literal not displayed */ PANO_INSERT_STMT = "INSERT INTO panorama(subject, observer, time, metrics) VALUES(?,?,?,?)" INFER_INSERT_STMT = "INSERT INTO inference(subject, observers, time, metrics) VALUES(?,?,?,?)" REGISTER_INSERT_STMT = "INSERT INTO registration(handle, module, observer, time) VALUES(?,?,?,?)" )
View Source
const ( REPORT_IGNORED int = iota REPORT_ACCEPTED REPORT_FAILED )
View Source
const (
MaxReportPerView = 10 // maximum number of reports to store for a given view
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheItem ¶
type CacheItem struct { Value interface{} // contains filtered or unexported fields }
type CacheListItem ¶
type CacheListItem struct {
// contains filtered or unexported fields
}
type HealthDBStorage ¶
func NewHealthDBStorage ¶
func NewHealthDBStorage(file string) *HealthDBStorage
func (*HealthDBStorage) Close ¶
func (self *HealthDBStorage) Close()
func (*HealthDBStorage) InsertInference ¶
func (self *HealthDBStorage) InsertInference(inf *pb.Inference) error
func (*HealthDBStorage) InsertRegistration ¶
func (self *HealthDBStorage) InsertRegistration(reg *dt.Registration) error
func (*HealthDBStorage) InsertReport ¶
func (self *HealthDBStorage) InsertReport(report *pb.Report) error
func (*HealthDBStorage) ReadRegistrations ¶
func (self *HealthDBStorage) ReadRegistrations() (map[uint64]*dt.Registration, uint64)
type HealthInferenceStorage ¶
type HealthInferenceStorage struct { Results InferMap Workbooks map[string]InferMap ReportCh chan *pb.Report SubjectCh chan string // contains filtered or unexported fields }
func NewHealthInferenceStorage ¶
func NewHealthInferenceStorage(raw dt.HealthStorage, algo dd.InferenceAlgo) *HealthInferenceStorage
func (*HealthInferenceStorage) DumpInference ¶
func (self *HealthInferenceStorage) DumpInference() map[string]*pb.Inference
func (*HealthInferenceStorage) GetInference ¶
func (self *HealthInferenceStorage) GetInference(subject string) *pb.Inference
func (*HealthInferenceStorage) InferReport ¶
func (*HealthInferenceStorage) InferReportAsync ¶
func (self *HealthInferenceStorage) InferReportAsync(report *pb.Report) error
func (*HealthInferenceStorage) InferSubject ¶
func (self *HealthInferenceStorage) InferSubject(subject string) (*pb.Inference, error)
func (*HealthInferenceStorage) InferSubjectAsync ¶
func (self *HealthInferenceStorage) InferSubjectAsync(subject string) error
func (*HealthInferenceStorage) SetDB ¶
func (self *HealthInferenceStorage) SetDB(db dt.HealthDB)
func (*HealthInferenceStorage) Start ¶
func (self *HealthInferenceStorage) Start() error
func (*HealthInferenceStorage) Stop ¶
func (self *HealthInferenceStorage) Stop() error
type RawHealthStorage ¶
type RawHealthStorage struct { Tenants map[string]*dt.ConcurrentPanorama Watchlist map[string]time.Time // contains filtered or unexported fields }
func NewRawHealthStorage ¶
func NewRawHealthStorage(subjects ...string) *RawHealthStorage
func (*RawHealthStorage) AddSubject ¶
func (self *RawHealthStorage) AddSubject(subject string) bool
func (*RawHealthStorage) Dump ¶
func (self *RawHealthStorage) Dump()
func (*RawHealthStorage) DumpPanorama ¶
func (self *RawHealthStorage) DumpPanorama() map[string]*pb.Panorama
func (*RawHealthStorage) GetLatestReport ¶
func (self *RawHealthStorage) GetLatestReport(subject string) *pb.Report
func (*RawHealthStorage) GetPanorama ¶
func (self *RawHealthStorage) GetPanorama(subject string) *dt.ConcurrentPanorama
func (*RawHealthStorage) GetSubjects ¶
func (self *RawHealthStorage) GetSubjects() map[string]time.Time
func (*RawHealthStorage) GetView ¶
func (self *RawHealthStorage) GetView(observer string, subject string) *pb.View
func (*RawHealthStorage) RemoveSubject ¶
func (self *RawHealthStorage) RemoveSubject(subject string, clean bool) bool
func (*RawHealthStorage) SetDB ¶
func (self *RawHealthStorage) SetDB(db dt.HealthDB)
Click to show internal directories.
Click to hide internal directories.