(store runtimeInstanceStore, id, podName string, heartbeatInterval time.Duration)
| 30 | } |
| 31 | |
| 32 | func NewControlPlaneRuntimeTracker(store runtimeInstanceStore, id, podName string, heartbeatInterval time.Duration) *ControlPlaneRuntimeTracker { |
| 33 | if heartbeatInterval <= 0 { |
| 34 | heartbeatInterval = 5 * time.Second |
| 35 | } |
| 36 | return &ControlPlaneRuntimeTracker{ |
| 37 | store: store, |
| 38 | id: id, |
| 39 | podName: podName, |
| 40 | heartbeatInterval: heartbeatInterval, |
| 41 | now: time.Now, |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | func (t *ControlPlaneRuntimeTracker) Start(ctx context.Context) error { |
| 46 | t.mu.Lock() |
no outgoing calls