feat(admin): cloud injection and the 15-minute reconciler
Injection is a single UpdateOne of three licence fields, so it is idempotent and safe to re-run. The control plane caches licence state for 60 seconds, so an injected licence takes effect within a minute with no restart. Deliver never fails its caller. The reconciler, not the issuance path, is what actually guarantees a cloud instance ends up holding the licence admin says it holds -- injection at issue time is best-effort and this is the backstop. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/mrhid6/vantage/admin/internal/config"
|
||||
"github.com/mrhid6/vantage/admin/internal/db"
|
||||
"github.com/mrhid6/vantage/admin/internal/inject"
|
||||
"github.com/mrhid6/vantage/admin/internal/licensing"
|
||||
"github.com/mrhid6/vantage/admin/internal/models"
|
||||
)
|
||||
@@ -46,6 +47,10 @@ func main() {
|
||||
}
|
||||
idxCancel()
|
||||
|
||||
reconcileCtx, stopReconcile := context.WithCancel(context.Background())
|
||||
defer stopReconcile()
|
||||
inject.StartReconciler(reconcileCtx)
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: cfg.Addr,
|
||||
Handler: http.NotFoundHandler(), // replaced in Task 8
|
||||
|
||||
Reference in New Issue
Block a user