Documentation ¶
Overview ¶
Package vm represents the intermediate step between a revere db struct and a renderable front-end struct.
Index ¶
- func AllMonitorLabelsForSubprobes(tx *db.Tx, subprobes []*Subprobe) (map[db.MonitorID][]*MonitorLabel, error)
- func DeleteSubprobe(tx *db.Tx, subprobeId int) error
- func IsLastBc(a []Breadcrumb, i int) bool
- func LoadActiveSilence(db *db.DB, id db.MonitorID, subprobe string) db.SilenceID
- func NewProbe(DB *db.DB, id db.MonitorID) (probe.VM, error)
- func PopulateLabelsForMonitors(tx *db.Tx, monitors []*Monitor) error
- type Breadcrumb
- func LabelIndexBcs() []Breadcrumb
- func LabelViewBcs(mn string, id int64) []Breadcrumb
- func MonitorIndexBcs() []Breadcrumb
- func MonitorViewBcs(mn string, id int64) []Breadcrumb
- func SilencesIndexBcs() []Breadcrumb
- func SilencesViewBcs(id int64, mn string) []Breadcrumb
- func SubprobeIndexBcs(mn string, id int64) []Breadcrumb
- func SubprobeViewBcs(s *Subprobe) []Breadcrumb
- type Component
- type CreatableComponent
- type DeletableComponent
- type Label
- type LabelMonitor
- type LabelTrigger
- type Monitor
- type MonitorLabel
- type MonitorTrigger
- type NamedComponent
- type Reading
- type Silence
- func (*Silence) ComponentName() string
- func (s *Silence) Editable() bool
- func (s *Silence) Id() int64
- func (s *Silence) IsCreate() bool
- func (s *Silence) IsPast(moment time.Time) bool
- func (s *Silence) IsPresent(moment time.Time) bool
- func (s *Silence) Save(tx *db.Tx) error
- func (s *Silence) SetHtmlParams(values url.Values) error
- func (s *Silence) Validate(db *db.DB) (errs []string)
- type Subprobe
- func AllAbnormalSubprobes(tx *db.Tx) ([]*Subprobe, error)
- func AllAbnormalSubprobesForLabel(tx *db.Tx, id db.LabelID) ([]*Subprobe, error)
- func AllSubprobesFromMonitor(tx *db.Tx, id db.MonitorID) ([]*Subprobe, error)
- func BlankSubprobe() *Subprobe
- func NewSubprobe(DB *db.DB, id db.SubprobeID) (*Subprobe, error)
- type SubprobeStatus
- type Trigger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLastBc ¶
func IsLastBc(a []Breadcrumb, i int) bool
func LoadActiveSilence ¶
Types ¶
type Breadcrumb ¶
func LabelIndexBcs ¶
func LabelIndexBcs() []Breadcrumb
func LabelViewBcs ¶
func LabelViewBcs(mn string, id int64) []Breadcrumb
func MonitorIndexBcs ¶
func MonitorIndexBcs() []Breadcrumb
func MonitorViewBcs ¶
func MonitorViewBcs(mn string, id int64) []Breadcrumb
func SilencesIndexBcs ¶
func SilencesIndexBcs() []Breadcrumb
func SilencesViewBcs ¶
func SilencesViewBcs(id int64, mn string) []Breadcrumb
func SubprobeIndexBcs ¶
func SubprobeIndexBcs(mn string, id int64) []Breadcrumb
func SubprobeViewBcs ¶
func SubprobeViewBcs(s *Subprobe) []Breadcrumb
type CreatableComponent ¶
type CreatableComponent interface {
IsCreate() bool
}
type DeletableComponent ¶
type DeletableComponent interface {
IsDelete() bool
}
type Label ¶
type Label struct { LabelID db.LabelID Name string Description string Triggers []*LabelTrigger Monitors []*LabelMonitor }
func BlankLabel ¶
func BlankLabel() *Label
func (*Label) ComponentName ¶
type LabelMonitor ¶
type LabelMonitor struct { // TODO(fchen): Organize struct fields between db-only fields, front-end-only fields, and shared fields Monitor *Monitor LabelID db.LabelID Subprobes string Create bool Delete bool }
func (*LabelMonitor) Id ¶
func (lm *LabelMonitor) Id() int64
func (*LabelMonitor) IsCreate ¶
func (lm *LabelMonitor) IsCreate() bool
func (*LabelMonitor) IsDelete ¶
func (lm *LabelMonitor) IsDelete() bool
type LabelTrigger ¶
func BlankLabelTrigger ¶
func BlankLabelTrigger() *LabelTrigger
func (*LabelTrigger) Id ¶
func (lt *LabelTrigger) Id() int64
func (*LabelTrigger) IsCreate ¶
func (lt *LabelTrigger) IsCreate() bool
func (*LabelTrigger) IsDelete ¶
func (lt *LabelTrigger) IsDelete() bool
type Monitor ¶
type Monitor struct { MonitorID db.MonitorID Name string Owner string Description string Response string ProbeType db.ProbeType ProbeParams string Changed time.Time Version int32 // TODO(fchen): changed and Archived need to match Archived *time.Time Probe probe.VM Triggers []*MonitorTrigger Labels []*MonitorLabel }
func AllMonitorsForLabel ¶
func BlankMonitor ¶
func (*Monitor) ComponentName ¶
type MonitorLabel ¶
type MonitorLabel struct { Label *Label MonitorID db.MonitorID Subprobes string Create bool Delete bool }
func (*MonitorLabel) Id ¶
func (ml *MonitorLabel) Id() int64
func (*MonitorLabel) IsCreate ¶
func (ml *MonitorLabel) IsCreate() bool
func (*MonitorLabel) IsDelete ¶
func (ml *MonitorLabel) IsDelete() bool
type MonitorTrigger ¶
func BlankMonitorTrigger ¶
func BlankMonitorTrigger() *MonitorTrigger
func (*MonitorTrigger) Id ¶
func (mt *MonitorTrigger) Id() int64
func (*MonitorTrigger) IsCreate ¶
func (mt *MonitorTrigger) IsCreate() bool
func (*MonitorTrigger) IsDelete ¶
func (mt *MonitorTrigger) IsDelete() bool
type NamedComponent ¶
type Reading ¶
type Reading struct { ReadingID db.ReadingID SubprobeID db.SubprobeID State state.State StateStr string Recorded time.Time }
func AllReadingsFromSubprobe ¶
func BlankReading ¶
func BlankReading() *Reading
type Silence ¶
type Silence struct { MonitorName string SilenceID db.SilenceID MonitorID db.MonitorID Subprobes string Start time.Time End time.Time }
func BlankSilence ¶
func BlankSilence() *Silence
func (*Silence) ComponentName ¶
type Subprobe ¶
type Subprobe struct { SubprobeID db.SubprobeID MonitorID db.MonitorID MonitorName string Name string Archived *time.Time Status SubprobeStatus }
func AllSubprobesFromMonitor ¶
func BlankSubprobe ¶
func BlankSubprobe() *Subprobe
func NewSubprobe ¶
type SubprobeStatus ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package renderables processes package vm structs and bundles them with the appropriate metadata, html templates, and scripts to create a fully functional web page.
|
Package renderables processes package vm structs and bundles them with the appropriate metadata, html templates, and scripts to create a fully functional web page. |
Click to show internal directories.
Click to hide internal directories.