MCPcopy Create free account
hub / github.com/PostHog/duckgres / NewControlPlaneRuntimeTracker

Function NewControlPlaneRuntimeTracker

controlplane/runtime_tracker.go:32–43  ·  view source on GitHub ↗
(store runtimeInstanceStore, id, podName string, heartbeatInterval time.Duration)

Source from the content-addressed store, hash-verified

30}
31
32func 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
45func (t *ControlPlaneRuntimeTracker) Start(ctx context.Context) error {
46 t.mu.Lock()

Calls

no outgoing calls