Skip to content

An open-source, faster Devin alternative

TypeScript

Merge pull request #360 from diggerhq/websocket-broker

Brian Reardond3b36925a136
diff --cc internal/qemu/manager.go
index f1774fc6,cf724b0d..c3ec0f1c
--- a/internal/qemu/manager.go
+++ b/internal/qemu/manager.go
@@@ -333,14 -333,9 +333,15 @@@ type Manager struct
// Metadata service callbacks (set via SetMetadataCallbacks)
onSandboxReady func(sandboxID, guestIP, template string, startedAt time.Time)
- onSandboxDestroy func(sandboxID string)
+ onSandboxDestroy func(sandboxID string)
+ onMigrationOutgoing func(sandboxID string)
+ // Billing-attribution observer (set via SetLifecycleObserver). nil-safe.
+ // Distinct from the metadata callbacks above so each consumer gets the
+ // data it actually needs (metadata wants guestIP/template; billing wants
+ // memory_mb/cpu_count). See internal/sandbox/lifecycle.go.
+ lifecycleObs sandbox.LifecycleObserver
+
// Hibernation upload status callback (set via SetHibernationUploadCallback).
// Invoked from the async archive+upload goroutine in doHibernate exactly once
// per hibernation, with err=nil on success or non-nil on archive/upload