From 967f6904ab41ed2dd8ac3c263d626a5b9997a2d8 Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Tue, 29 Sep 2026 15:31:33 +1000 Subject: [PATCH] refactor: move KV leases to state foundation --- spinifex/{ => foundation/state}/kvlease/bucket.go | 0 spinifex/{ => foundation/state}/kvlease/lease.go | 0 spinifex/{ => foundation/state}/kvlease/lease_test.go | 2 +- spinifex/handlers/bedrock/reaper.go | 2 +- spinifex/handlers/ecs/scheduler.go | 2 +- spinifex/handlers/ecs/store.go | 2 +- spinifex/handlers/eks/cluster_reconciler.go | 2 +- spinifex/handlers/eks/service_impl.go | 2 +- spinifex/handlers/eks/store.go | 2 +- spinifex/handlers/rds/reconciler.go | 2 +- spinifex/handlers/rds/store.go | 2 +- spinifex/network/reconcile/lock.go | 2 +- 12 files changed, 10 insertions(+), 10 deletions(-) rename spinifex/{ => foundation/state}/kvlease/bucket.go (100%) rename spinifex/{ => foundation/state}/kvlease/lease.go (100%) rename spinifex/{ => foundation/state}/kvlease/lease_test.go (99%) diff --git a/spinifex/kvlease/bucket.go b/spinifex/foundation/state/kvlease/bucket.go similarity index 100% rename from spinifex/kvlease/bucket.go rename to spinifex/foundation/state/kvlease/bucket.go diff --git a/spinifex/kvlease/lease.go b/spinifex/foundation/state/kvlease/lease.go similarity index 100% rename from spinifex/kvlease/lease.go rename to spinifex/foundation/state/kvlease/lease.go diff --git a/spinifex/kvlease/lease_test.go b/spinifex/foundation/state/kvlease/lease_test.go similarity index 99% rename from spinifex/kvlease/lease_test.go rename to spinifex/foundation/state/kvlease/lease_test.go index 4e1119f31..9c2fa18d9 100644 --- a/spinifex/kvlease/lease_test.go +++ b/spinifex/foundation/state/kvlease/lease_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/bedrock/reaper.go b/spinifex/handlers/bedrock/reaper.go index 57cd44134..582ecf26e 100644 --- a/spinifex/handlers/bedrock/reaper.go +++ b/spinifex/handlers/bedrock/reaper.go @@ -8,7 +8,7 @@ import ( "time" gateway_bedrock "github.com/mulgadc/spinifex/spinifex/gateway/bedrock" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" "github.com/mulgadc/spinifex/spinifex/utils" diff --git a/spinifex/handlers/ecs/scheduler.go b/spinifex/handlers/ecs/scheduler.go index 1bf236f54..088c017a8 100644 --- a/spinifex/handlers/ecs/scheduler.go +++ b/spinifex/handlers/ecs/scheduler.go @@ -11,7 +11,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/reconciler" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/ecs/store.go b/spinifex/handlers/ecs/store.go index 0e36a2eeb..46cc58aee 100644 --- a/spinifex/handlers/ecs/store.go +++ b/spinifex/handlers/ecs/store.go @@ -8,7 +8,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/foundation/state/migrate" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/eks/cluster_reconciler.go b/spinifex/handlers/eks/cluster_reconciler.go index 81ef36871..c96d7ad0c 100644 --- a/spinifex/handlers/eks/cluster_reconciler.go +++ b/spinifex/handlers/eks/cluster_reconciler.go @@ -13,7 +13,7 @@ import ( "sync/atomic" "time" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/reconciler" diff --git a/spinifex/handlers/eks/service_impl.go b/spinifex/handlers/eks/service_impl.go index f1ca7efcd..108ec2a96 100644 --- a/spinifex/handlers/eks/service_impl.go +++ b/spinifex/handlers/eks/service_impl.go @@ -27,7 +27,7 @@ import ( handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" "github.com/mulgadc/spinifex/spinifex/handlers/sysinstance" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/idempotency" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/mulgadc/spinifex/spinifex/objectstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go" diff --git a/spinifex/handlers/eks/store.go b/spinifex/handlers/eks/store.go index ec5367560..9efcdf64d 100644 --- a/spinifex/handlers/eks/store.go +++ b/spinifex/handlers/eks/store.go @@ -12,7 +12,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/foundation/state/migrate" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/rds/reconciler.go b/spinifex/handlers/rds/reconciler.go index 733a064a7..c1da52ca9 100644 --- a/spinifex/handlers/rds/reconciler.go +++ b/spinifex/handlers/rds/reconciler.go @@ -11,7 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/reconciler" "github.com/mulgadc/spinifex/spinifex/utils" diff --git a/spinifex/handlers/rds/store.go b/spinifex/handlers/rds/store.go index b0043dd4c..01e4926c5 100644 --- a/spinifex/handlers/rds/store.go +++ b/spinifex/handlers/rds/store.go @@ -14,7 +14,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/foundation/state/migrate" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/network/reconcile/lock.go b/spinifex/network/reconcile/lock.go index 3990db525..ad625eb65 100644 --- a/spinifex/network/reconcile/lock.go +++ b/spinifex/network/reconcile/lock.go @@ -5,7 +5,7 @@ import ( "log/slog" "time" - "github.com/mulgadc/spinifex/spinifex/kvlease" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvlease" "github.com/nats-io/nats.go" )