Documentation
¶
Index ¶
- func ChangeStatus(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func Delete(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler)
- func List(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func ListOne(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func ResetStatus(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func SubmitRecomputation(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- func Update(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)
- type AppliedStatusChange
- type Exclude
- type ExcludeMonSource
- type ExcludedMetric
- type HistoryItem
- type IncomingRecomputation
- type IncomingRequest
- type IncomingStatus
- type Links
- type Message
- type MongoInterface
- type SelfReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeStatus ¶
ChangeStatus updates the status of an existing recomputation
func HandleSubrouter ¶
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler)
HandleSubrouter uses the subrouter for a specific calls and creates a tree of sorts handling each route with a different subrouter
func ResetStatus ¶
ResetStatus resets status changes back to pending when recomputation was created
func SubmitRecomputation ¶
SubmitRecomputation insert a new pending recomputation in the tenants database
Types ¶
type AppliedStatusChange ¶
type AppliedStatusChange struct {
Metric string `bson:"metric" json:"metric,omitempty"`
Hostname string `bson:"hostname" json:"hostname,omitempty"`
Service string `bson:"service" json:"service,omitempty"`
Group string `bson:"group" json:"group,omitempty"`
State string `bson:"state" json:"state,omitempty"`
}
Additional field to represent items that have applied statuses on them Items can be metrics, endpoints, services or groups
type ExcludeMonSource ¶
type ExcludedMetric ¶
type HistoryItem ¶
type IncomingRecomputation ¶
type IncomingRecomputation struct {
ID string `xml:"id" json:"id" bson:"id,omitempty"`
StartTime string `xml:"start_time,attr" json:"start_time" bson:"start_time,omitempty"`
RequesterName string `xml:"requester_name" json:"requester_name" bson:"requester_name,omitempty" `
RequesterEmail string `xml:"requester_email" json:"requester_email" bson:"requester_email,omitempty" `
EndTime string `xml:"end_time,attr" json:"end_time" bson:"end_time,omitempty"`
Reason string `xml:"reason,attr" json:"reason" bson:"reason,omitempty"`
Report string `xml:"report,attr" json:"report" bson:"report,omitempty"`
Exclude []string `xml:"exclude" json:"exclude" bson:"exclude,omitempty"`
ExcludeMonSource []ExcludeMonSource `bson:"exclude_monitoring_source" json:"exclude_monitoring_source,omitempty"`
ExcludeMetrics []ExcludedMetric `bson:"exclude_metrics" json:"exclude_metrics,omitempty"`
AppliedStatusChanges []AppliedStatusChange `bson:"applied_status_changes" json:"applied_status_changes,omitempty"`
}
type IncomingRequest ¶
type IncomingRequest struct {
Data []IncomingRecomputation `xml:"data" json:"data"`
}
type IncomingStatus ¶
type IncomingStatus struct {
Status string `xml:"status" json:"status"`
}
type MongoInterface ¶
type MongoInterface struct {
XMLName xml.Name `bson:"-" xml:"recomputation" json:"-"`
ID string `bson:"id" xml:"id" json:"id"`
RequesterName string `bson:"requester_name" xml:"requester_name" json:"requester_name"`
RequesterEmail string `bson:"requester_email" xml:"requester_email" json:"requester_email"`
Reason string `bson:"reason" xml:"reason" json:"reason"`
StartTime string `bson:"start_time" xml:"start_time" json:"start_time"`
EndTime string `bson:"end_time" xml:"end_time" json:"end_time"`
Report string `bson:"report" xml:"report" json:"report"`
Exclude []string `bson:"exclude" xml:"exclude>group" json:"exclude"`
Status string `bson:"status" xml:"status" json:"status"`
Timestamp string `bson:"timestamp" xml:"timestamp" json:"timestamp"`
History []HistoryItem `bson:"history" xml:"history" json:"history"`
ExcludeMetrics []ExcludedMetric `bson:"exclude_metrics" json:"exclude_metrics,omitempty"`
ExcludeMonSource []ExcludeMonSource `bson:"exclude_monitoring_source" json:"exclude_monitoring_source,omitempty"`
AppliedStatusChanges []AppliedStatusChange `bson:"applied_status_changes" json:"applied_status_changes,omitempty"`
}
type SelfReference ¶
Click to show internal directories.
Click to hide internal directories.