Dont generatePodStatus twice for new pods

This commit is contained in:
Prashanth Balasubramanian
2015-06-09 17:50:15 -07:00
parent 5a02fc07d8
commit b5ed0e9b13
8 changed files with 163 additions and 81 deletions

View File

@@ -83,27 +83,6 @@ func Register(containerCache kubecontainer.RuntimeCache) {
})
}
type SyncPodType int
const (
SyncPodSync SyncPodType = iota
SyncPodUpdate
SyncPodCreate
)
func (sp SyncPodType) String() string {
switch sp {
case SyncPodCreate:
return "create"
case SyncPodUpdate:
return "update"
case SyncPodSync:
return "sync"
default:
return "unknown"
}
}
// Gets the time since the specified start in microseconds.
func SinceInMicroseconds(start time.Time) float64 {
return float64(time.Since(start).Nanoseconds() / time.Microsecond.Nanoseconds())