mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-19 04:06:24 +00:00
add custom problem detector plugin
This commit is contained in:
@@ -76,3 +76,22 @@ type Status struct {
|
||||
// newest node conditions in this field.
|
||||
Conditions []Condition `json:"conditions"`
|
||||
}
|
||||
|
||||
// Type is the type of the problem.
|
||||
type Type string
|
||||
|
||||
const (
|
||||
// Temp means the problem is temporary, only need to report an event.
|
||||
Temp Type = "temporary"
|
||||
// Perm means the problem is permanent, need to change the node condition.
|
||||
Perm Type = "permanent"
|
||||
)
|
||||
|
||||
// Monitor monitors log and custom plugins and reports node problem condition and event according to
|
||||
// the rules.
|
||||
type Monitor interface {
|
||||
// Start starts the log monitor.
|
||||
Start() (<-chan *Status, error)
|
||||
// Stop stops the log monitor.
|
||||
Stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user