name, docs

This commit is contained in:
Nan Monnand Deng 2014-06-20 17:22:03 -04:00
parent 4a64d1f90b
commit cc39f9996b
2 changed files with 14 additions and 9 deletions

View File

@ -16,8 +16,17 @@ package inference
import "github.com/google/cadvisor/info"
type AntagonismDetector interface {
// InterferenceDectector detects if there's a container which
// interference with a set of container. The detector monitors
// a set of container and find the victims and antagnist.
type InterferenceDetector interface {
// Monitor the behavior of the container.
AddContainer(ref info.ContainerReference)
Detect() ([]*info.Antagonism, error)
// Returns a list of Interference. The upper layer may take action
// based on the interference.
Detect() ([]*info.Interference, error)
// The name of the detector.
Name() string
}

View File

@ -17,7 +17,7 @@ package info
// This struct describes one type of relationship between containers: One
// container, antagonist, interferes the performance of other
// containers, victims.
type Antagonism struct {
type Interference struct {
// The absolute path of the atagnoism container name. This field should
// not be empty.
Antagonist string `json:"antagonist"`
@ -27,12 +27,8 @@ type Antagonism struct {
// The detector name which detects this agtagonism. This field should
// not be empty.
Dectory string `json:"detector"`
Detector string `json:"detector"`
// Human readable string
// Human readable description of the interference
Description string `json:"description,omitempty"`
}
type Interference struct {
Antagonisms []*Antagonism `json:"antagonisms,omitempty"`
}