From 57f9d2ccc4bc5f236d219540ef66d493bca9bc87 Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Tue, 29 Sep 2026 15:22:57 +1000 Subject: [PATCH] refactor: move KV store to state foundation --- spinifex/daemon/dns_reconcile.go | 2 +- spinifex/daemon/dns_reconcile_ec2_test.go | 2 +- spinifex/daemon/dns_reconcile_test.go | 2 +- spinifex/daemon/instance_records.go | 2 +- spinifex/daemon/instance_records_test.go | 2 +- spinifex/daemon/jetstream.go | 2 +- spinifex/daemon/jetstream_test.go | 2 +- spinifex/{ => foundation/state}/kvstore/bucket.go | 0 spinifex/{ => foundation/state}/kvstore/export_test.go | 0 spinifex/{ => foundation/state}/kvstore/recovery_test.go | 2 +- spinifex/{ => foundation/state}/kvstore/snapshot_test.go | 2 +- spinifex/{ => foundation/state}/kvstore/store.go | 0 spinifex/{ => foundation/state}/kvstore/store_test.go | 2 +- spinifex/{ => foundation/state}/kvstore/wait.go | 0 spinifex/{ => foundation/state}/kvstore/wait_test.go | 2 +- spinifex/gateway/bedrock/access.go | 2 +- spinifex/gateway/bedrock/credentials.go | 2 +- spinifex/gateway/bedrock/guardrail.go | 2 +- spinifex/gateway/bedrock/logging.go | 2 +- spinifex/gateway/bedrock/prices.go | 2 +- spinifex/gateway/bedrock/provisioned.go | 2 +- spinifex/gateway/bedrock/usage.go | 2 +- spinifex/gateway/bedrock/weights.go | 2 +- spinifex/handlers/acm/store.go | 2 +- spinifex/handlers/bedrock/reaper.go | 2 +- spinifex/handlers/bedrock/service.go | 2 +- spinifex/handlers/bedrock/store.go | 2 +- spinifex/handlers/bedrock/store_test.go | 2 +- spinifex/handlers/dns/reconcile_test.go | 2 +- spinifex/handlers/ec2/instance/service_impl.go | 2 +- spinifex/handlers/ec2/snapshot/service_impl.go | 2 +- spinifex/handlers/ec2/snapshot/service_impl_test.go | 2 +- spinifex/handlers/ec2/vpc/ipam.go | 2 +- spinifex/handlers/eks/cluster_reconciler.go | 2 +- spinifex/handlers/eks/store.go | 2 +- spinifex/handlers/elbv2/service_impl.go | 2 +- spinifex/handlers/elbv2/store.go | 2 +- spinifex/handlers/imds/service.go | 2 +- spinifex/handlers/ochrevector/appliance.go | 2 +- spinifex/handlers/ochrevector/jobs.go | 2 +- spinifex/handlers/ochrevector/kbstore.go | 2 +- spinifex/handlers/ochrevector/registry.go | 2 +- spinifex/handlers/quota/quota.go | 2 +- spinifex/handlers/quota/records.go | 2 +- spinifex/handlers/quota/records_test.go | 2 +- spinifex/handlers/quota/vcpu.go | 2 +- spinifex/handlers/rds/agent.go | 2 +- spinifex/handlers/rds/backup.go | 2 +- spinifex/handlers/rds/backup_sweep.go | 2 +- spinifex/handlers/rds/backup_sweep_test.go | 2 +- spinifex/handlers/rds/bootstrap.go | 2 +- spinifex/handlers/rds/create.go | 2 +- spinifex/handlers/rds/delete.go | 2 +- spinifex/handlers/rds/describe.go | 2 +- spinifex/handlers/rds/dns.go | 2 +- spinifex/handlers/rds/events.go | 2 +- spinifex/handlers/rds/lifecycle.go | 2 +- spinifex/handlers/rds/modify.go | 2 +- spinifex/handlers/rds/modify_lease.go | 2 +- spinifex/handlers/rds/modify_test.go | 2 +- spinifex/handlers/rds/network.go | 2 +- spinifex/handlers/rds/parametergroup.go | 2 +- spinifex/handlers/rds/pending.go | 2 +- spinifex/handlers/rds/reconciler.go | 2 +- spinifex/handlers/rds/recovery.go | 2 +- spinifex/handlers/rds/replace.go | 2 +- spinifex/handlers/rds/restore.go | 2 +- spinifex/handlers/rds/service.go | 2 +- spinifex/handlers/rds/snapshot.go | 2 +- spinifex/handlers/rds/store.go | 2 +- spinifex/handlers/rds/subnetgroup.go | 2 +- spinifex/handlers/rds/tags.go | 2 +- spinifex/handlers/sts/assume_role.go | 2 +- spinifex/handlers/sts/service_impl.go | 2 +- spinifex/handlers/sts/session_credentials.go | 2 +- spinifex/handlers/sts/session_credentials_test.go | 2 +- spinifex/instancecache/cache.go | 2 +- spinifex/instancecache/cache_test.go | 2 +- spinifex/instancecache/liveness.go | 2 +- spinifex/instancecache/liveness_test.go | 2 +- spinifex/instancecache/resume_from_revision_test.go | 2 +- spinifex/network/external/ocinet/affinity.go | 2 +- spinifex/network/external/ocinet/allocator.go | 2 +- spinifex/network/external/ocinet/allocator_test.go | 2 +- spinifex/network/external/ocinet/lookup.go | 2 +- spinifex/network/external/ocinet/reconcile.go | 2 +- spinifex/network/external/ocinet/reconcile_test.go | 2 +- spinifex/network/external/ocinet/store.go | 2 +- spinifex/network/external/static_pool.go | 2 +- spinifex/network/reconcile/drift.go | 2 +- spinifex/reconciler/reconciler.go | 2 +- spinifex/reconciler/reconciler_test.go | 2 +- spinifex/runtime/compute/vm/mock/mock.go | 2 +- spinifex/services/awsgw/awsgw.go | 2 +- spinifex/vpcd/imds_instance_state.go | 2 +- 95 files changed, 91 insertions(+), 91 deletions(-) rename spinifex/{ => foundation/state}/kvstore/bucket.go (100%) rename spinifex/{ => foundation/state}/kvstore/export_test.go (100%) rename spinifex/{ => foundation/state}/kvstore/recovery_test.go (99%) rename spinifex/{ => foundation/state}/kvstore/snapshot_test.go (98%) rename spinifex/{ => foundation/state}/kvstore/store.go (100%) rename spinifex/{ => foundation/state}/kvstore/store_test.go (99%) rename spinifex/{ => foundation/state}/kvstore/wait.go (100%) rename spinifex/{ => foundation/state}/kvstore/wait_test.go (97%) diff --git a/spinifex/daemon/dns_reconcile.go b/spinifex/daemon/dns_reconcile.go index 4dc930da6..6824eb471 100644 --- a/spinifex/daemon/dns_reconcile.go +++ b/spinifex/daemon/dns_reconcile.go @@ -12,7 +12,7 @@ import ( handlers_eks "github.com/mulgadc/spinifex/spinifex/handlers/eks" handlers_elbv2 "github.com/mulgadc/spinifex/spinifex/handlers/elbv2" handlers_rds "github.com/mulgadc/spinifex/spinifex/handlers/rds" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/reconciler" ) diff --git a/spinifex/daemon/dns_reconcile_ec2_test.go b/spinifex/daemon/dns_reconcile_ec2_test.go index e4fb56ffa..ff2c3246a 100644 --- a/spinifex/daemon/dns_reconcile_ec2_test.go +++ b/spinifex/daemon/dns_reconcile_ec2_test.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/mulgadc/spinifex/spinifex/config" handlers_dns "github.com/mulgadc/spinifex/spinifex/handlers/dns" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/stretchr/testify/assert" diff --git a/spinifex/daemon/dns_reconcile_test.go b/spinifex/daemon/dns_reconcile_test.go index c8292440c..521beeaf0 100644 --- a/spinifex/daemon/dns_reconcile_test.go +++ b/spinifex/daemon/dns_reconcile_test.go @@ -12,7 +12,7 @@ import ( handlers_elbv2 "github.com/mulgadc/spinifex/spinifex/handlers/elbv2" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" handlers_rds "github.com/mulgadc/spinifex/spinifex/handlers/rds" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/daemon/instance_records.go b/spinifex/daemon/instance_records.go index 38f8e8306..c893c42b8 100644 --- a/spinifex/daemon/instance_records.go +++ b/spinifex/daemon/instance_records.go @@ -5,7 +5,7 @@ import ( "errors" "log/slog" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/daemon/instance_records_test.go b/spinifex/daemon/instance_records_test.go index acafc6fd9..f26d396b8 100644 --- a/spinifex/daemon/instance_records_test.go +++ b/spinifex/daemon/instance_records_test.go @@ -6,7 +6,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/daemon" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go" diff --git a/spinifex/daemon/jetstream.go b/spinifex/daemon/jetstream.go index 483c3dd2a..f3203df26 100644 --- a/spinifex/daemon/jetstream.go +++ b/spinifex/daemon/jetstream.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/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" diff --git a/spinifex/daemon/jetstream_test.go b/spinifex/daemon/jetstream_test.go index 30444418c..19ffa0c05 100644 --- a/spinifex/daemon/jetstream_test.go +++ b/spinifex/daemon/jetstream_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go" diff --git a/spinifex/kvstore/bucket.go b/spinifex/foundation/state/kvstore/bucket.go similarity index 100% rename from spinifex/kvstore/bucket.go rename to spinifex/foundation/state/kvstore/bucket.go diff --git a/spinifex/kvstore/export_test.go b/spinifex/foundation/state/kvstore/export_test.go similarity index 100% rename from spinifex/kvstore/export_test.go rename to spinifex/foundation/state/kvstore/export_test.go diff --git a/spinifex/kvstore/recovery_test.go b/spinifex/foundation/state/kvstore/recovery_test.go similarity index 99% rename from spinifex/kvstore/recovery_test.go rename to spinifex/foundation/state/kvstore/recovery_test.go index 968cc5fba..fb60116a8 100644 --- a/spinifex/kvstore/recovery_test.go +++ b/spinifex/foundation/state/kvstore/recovery_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats-server/v2/server" diff --git a/spinifex/kvstore/snapshot_test.go b/spinifex/foundation/state/kvstore/snapshot_test.go similarity index 98% rename from spinifex/kvstore/snapshot_test.go rename to spinifex/foundation/state/kvstore/snapshot_test.go index 284b05ae7..c38cb88f6 100644 --- a/spinifex/kvstore/snapshot_test.go +++ b/spinifex/foundation/state/kvstore/snapshot_test.go @@ -3,7 +3,7 @@ package kvstore_test import ( "testing" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/stretchr/testify/require" ) diff --git a/spinifex/kvstore/store.go b/spinifex/foundation/state/kvstore/store.go similarity index 100% rename from spinifex/kvstore/store.go rename to spinifex/foundation/state/kvstore/store.go diff --git a/spinifex/kvstore/store_test.go b/spinifex/foundation/state/kvstore/store_test.go similarity index 99% rename from spinifex/kvstore/store_test.go rename to spinifex/foundation/state/kvstore/store_test.go index 0afe74429..fdef3c674 100644 --- a/spinifex/kvstore/store_test.go +++ b/spinifex/foundation/state/kvstore/store_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/kvstore/wait.go b/spinifex/foundation/state/kvstore/wait.go similarity index 100% rename from spinifex/kvstore/wait.go rename to spinifex/foundation/state/kvstore/wait.go diff --git a/spinifex/kvstore/wait_test.go b/spinifex/foundation/state/kvstore/wait_test.go similarity index 97% rename from spinifex/kvstore/wait_test.go rename to spinifex/foundation/state/kvstore/wait_test.go index ea179989c..95941ec6d 100644 --- a/spinifex/kvstore/wait_test.go +++ b/spinifex/foundation/state/kvstore/wait_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/spinifex/gateway/bedrock/access.go b/spinifex/gateway/bedrock/access.go index 3e4878fa3..58d981d57 100644 --- a/spinifex/gateway/bedrock/access.go +++ b/spinifex/gateway/bedrock/access.go @@ -7,7 +7,7 @@ import ( "fmt" "strings" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/credentials.go b/spinifex/gateway/bedrock/credentials.go index bc3c4277b..bf76e9f18 100644 --- a/spinifex/gateway/bedrock/credentials.go +++ b/spinifex/gateway/bedrock/credentials.go @@ -6,7 +6,7 @@ import ( "fmt" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/guardrail.go b/spinifex/gateway/bedrock/guardrail.go index d4e25dfd5..cb20af27f 100644 --- a/spinifex/gateway/bedrock/guardrail.go +++ b/spinifex/gateway/bedrock/guardrail.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/bedrock" "github.com/aws/aws-sdk-go/service/bedrockruntime" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/logging.go b/spinifex/gateway/bedrock/logging.go index 07cde73a2..ba0a7d78d 100644 --- a/spinifex/gateway/bedrock/logging.go +++ b/spinifex/gateway/bedrock/logging.go @@ -16,7 +16,7 @@ import ( "github.com/aws/aws-sdk-go/service/bedrock" "github.com/aws/aws-sdk-go/service/s3" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/objectstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/prices.go b/spinifex/gateway/bedrock/prices.go index 7d74f0dd5..17711505d 100644 --- a/spinifex/gateway/bedrock/prices.go +++ b/spinifex/gateway/bedrock/prices.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/provisioned.go b/spinifex/gateway/bedrock/provisioned.go index fb1b22b40..567aa6e7f 100644 --- a/spinifex/gateway/bedrock/provisioned.go +++ b/spinifex/gateway/bedrock/provisioned.go @@ -10,7 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/bedrock" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/usage.go b/spinifex/gateway/bedrock/usage.go index 04b5e504d..bdc5c94c3 100644 --- a/spinifex/gateway/bedrock/usage.go +++ b/spinifex/gateway/bedrock/usage.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/gateway/bedrock/weights.go b/spinifex/gateway/bedrock/weights.go index 9f82d9d7b..ea39a1336 100644 --- a/spinifex/gateway/bedrock/weights.go +++ b/spinifex/gateway/bedrock/weights.go @@ -9,7 +9,7 @@ import ( "sort" "sync" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/acm/store.go b/spinifex/handlers/acm/store.go index 5c45e0553..ae1fa9a06 100644 --- a/spinifex/handlers/acm/store.go +++ b/spinifex/handlers/acm/store.go @@ -13,7 +13,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/arn" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "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 85313f635..57cd44134 100644 --- a/spinifex/handlers/bedrock/reaper.go +++ b/spinifex/handlers/bedrock/reaper.go @@ -9,7 +9,7 @@ import ( gateway_bedrock "github.com/mulgadc/spinifex/spinifex/gateway/bedrock" "github.com/mulgadc/spinifex/spinifex/kvlease" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "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/bedrock/service.go b/spinifex/handlers/bedrock/service.go index e99961bad..14bf45780 100644 --- a/spinifex/handlers/bedrock/service.go +++ b/spinifex/handlers/bedrock/service.go @@ -14,7 +14,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/config" gateway_bedrock "github.com/mulgadc/spinifex/spinifex/gateway/bedrock" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/bedrock/store.go b/spinifex/handlers/bedrock/store.go index 18ee326dc..5026a5e0f 100644 --- a/spinifex/handlers/bedrock/store.go +++ b/spinifex/handlers/bedrock/store.go @@ -6,7 +6,7 @@ import ( "errors" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/bedrock/store_test.go b/spinifex/handlers/bedrock/store_test.go index 95a0e7aca..c6e511015 100644 --- a/spinifex/handlers/bedrock/store_test.go +++ b/spinifex/handlers/bedrock/store_test.go @@ -3,7 +3,7 @@ package handlers_bedrock import ( "testing" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/spinifex/handlers/dns/reconcile_test.go b/spinifex/handlers/dns/reconcile_test.go index ee0129d7d..1211b2212 100644 --- a/spinifex/handlers/dns/reconcile_test.go +++ b/spinifex/handlers/dns/reconcile_test.go @@ -7,7 +7,7 @@ import ( "time" nsconfig "github.com/mulgadc/northstar/pkg/config" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" reconcilelock "github.com/mulgadc/spinifex/spinifex/network/reconcile" "github.com/mulgadc/spinifex/spinifex/reconciler" "github.com/mulgadc/spinifex/internal/testkit" diff --git a/spinifex/handlers/ec2/instance/service_impl.go b/spinifex/handlers/ec2/instance/service_impl.go index d0bc9e47f..59b020daa 100644 --- a/spinifex/handlers/ec2/instance/service_impl.go +++ b/spinifex/handlers/ec2/instance/service_impl.go @@ -25,7 +25,7 @@ import ( awsfilters "github.com/mulgadc/spinifex/spinifex/foundation/aws/filters" handlers_dns "github.com/mulgadc/spinifex/spinifex/handlers/dns" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/objectstore" spxtypes "github.com/mulgadc/spinifex/spinifex/types" diff --git a/spinifex/handlers/ec2/snapshot/service_impl.go b/spinifex/handlers/ec2/snapshot/service_impl.go index 339b5ebfd..a5dff94bb 100644 --- a/spinifex/handlers/ec2/snapshot/service_impl.go +++ b/spinifex/handlers/ec2/snapshot/service_impl.go @@ -22,7 +22,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/providers/ebs" awsfilters "github.com/mulgadc/spinifex/spinifex/foundation/aws/filters" "github.com/mulgadc/spinifex/spinifex/handlers/ec2/volumestate" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/mulgadc/spinifex/spinifex/objectstore" "github.com/mulgadc/spinifex/spinifex/types" diff --git a/spinifex/handlers/ec2/snapshot/service_impl_test.go b/spinifex/handlers/ec2/snapshot/service_impl_test.go index a19c5d7cf..818dbde2b 100644 --- a/spinifex/handlers/ec2/snapshot/service_impl_test.go +++ b/spinifex/handlers/ec2/snapshot/service_impl_test.go @@ -17,7 +17,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/config" "github.com/mulgadc/spinifex/spinifex/domains/ec2/ebs/metadata" "github.com/mulgadc/spinifex/spinifex/providers/ebs" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/objectstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/ec2/vpc/ipam.go b/spinifex/handlers/ec2/vpc/ipam.go index ca58c9dd4..084b8d5af 100644 --- a/spinifex/handlers/ec2/vpc/ipam.go +++ b/spinifex/handlers/ec2/vpc/ipam.go @@ -7,7 +7,7 @@ import ( "log/slog" "net/netip" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/eks/cluster_reconciler.go b/spinifex/handlers/eks/cluster_reconciler.go index 5a648eaef..91c0589f0 100644 --- a/spinifex/handlers/eks/cluster_reconciler.go +++ b/spinifex/handlers/eks/cluster_reconciler.go @@ -14,7 +14,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/kvlease" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" "github.com/mulgadc/spinifex/spinifex/reconciler" diff --git a/spinifex/handlers/eks/store.go b/spinifex/handlers/eks/store.go index 21d32d5b8..c670c6ff9 100644 --- a/spinifex/handlers/eks/store.go +++ b/spinifex/handlers/eks/store.go @@ -10,7 +10,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/kvlease" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/nats-io/nats.go" diff --git a/spinifex/handlers/elbv2/service_impl.go b/spinifex/handlers/elbv2/service_impl.go index dfb09cacf..8029fe7d2 100644 --- a/spinifex/handlers/elbv2/service_impl.go +++ b/spinifex/handlers/elbv2/service_impl.go @@ -26,7 +26,7 @@ import ( handlers_dns "github.com/mulgadc/spinifex/spinifex/handlers/dns" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/topology" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" "github.com/mulgadc/spinifex/spinifex/utils" diff --git a/spinifex/handlers/elbv2/store.go b/spinifex/handlers/elbv2/store.go index 743453d16..f32421bda 100644 --- a/spinifex/handlers/elbv2/store.go +++ b/spinifex/handlers/elbv2/store.go @@ -10,7 +10,7 @@ import ( "strings" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/nats-io/nats.go" diff --git a/spinifex/handlers/imds/service.go b/spinifex/handlers/imds/service.go index 1d4075f00..3fb5b2329 100644 --- a/spinifex/handlers/imds/service.go +++ b/spinifex/handlers/imds/service.go @@ -11,7 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/ochrevector/appliance.go b/spinifex/handlers/ochrevector/appliance.go index 50f272c63..24630b8f9 100644 --- a/spinifex/handlers/ochrevector/appliance.go +++ b/spinifex/handlers/ochrevector/appliance.go @@ -12,7 +12,7 @@ import ( "time" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ochrevector/jobs.go b/spinifex/handlers/ochrevector/jobs.go index b9e2c8e1b..c8d4b5c8e 100644 --- a/spinifex/handlers/ochrevector/jobs.go +++ b/spinifex/handlers/ochrevector/jobs.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ochrevector/kbstore.go b/spinifex/handlers/ochrevector/kbstore.go index 8c4fea9f6..167db3c1e 100644 --- a/spinifex/handlers/ochrevector/kbstore.go +++ b/spinifex/handlers/ochrevector/kbstore.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/ochrevector/registry.go b/spinifex/handlers/ochrevector/registry.go index f2db5e38d..2097e2467 100644 --- a/spinifex/handlers/ochrevector/registry.go +++ b/spinifex/handlers/ochrevector/registry.go @@ -8,7 +8,7 @@ import ( "slices" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/quota/quota.go b/spinifex/handlers/quota/quota.go index 508399fa6..baea13217 100644 --- a/spinifex/handlers/quota/quota.go +++ b/spinifex/handlers/quota/quota.go @@ -8,7 +8,7 @@ import ( "fmt" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/quota/records.go b/spinifex/handlers/quota/records.go index 08dac05c4..082d5f299 100644 --- a/spinifex/handlers/quota/records.go +++ b/spinifex/handlers/quota/records.go @@ -6,7 +6,7 @@ import ( "log/slog" "github.com/mulgadc/spinifex/spinifex/domains/ec2/instancetypes" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/handlers/quota/records_test.go b/spinifex/handlers/quota/records_test.go index f92b1f141..dd5ae9047 100644 --- a/spinifex/handlers/quota/records_test.go +++ b/spinifex/handlers/quota/records_test.go @@ -8,7 +8,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" handlers_quota "github.com/mulgadc/spinifex/spinifex/handlers/quota" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" diff --git a/spinifex/handlers/quota/vcpu.go b/spinifex/handlers/quota/vcpu.go index 4158c31d5..936d38c42 100644 --- a/spinifex/handlers/quota/vcpu.go +++ b/spinifex/handlers/quota/vcpu.go @@ -9,7 +9,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/domains/ec2/instancetypes" gateway_ec2_instance "github.com/mulgadc/spinifex/spinifex/gateway/ec2/instance" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go" ) diff --git a/spinifex/handlers/rds/agent.go b/spinifex/handlers/rds/agent.go index f2dc475d0..0c4447cc1 100644 --- a/spinifex/handlers/rds/agent.go +++ b/spinifex/handlers/rds/agent.go @@ -8,7 +8,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/handlers/rds/backup.go b/spinifex/handlers/rds/backup.go index 418ee5b9d..355b70b2a 100644 --- a/spinifex/handlers/rds/backup.go +++ b/spinifex/handlers/rds/backup.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // Automated backups: one snapshot per instance per day inside its diff --git a/spinifex/handlers/rds/backup_sweep.go b/spinifex/handlers/rds/backup_sweep.go index 4df4bf1cd..dd40af613 100644 --- a/spinifex/handlers/rds/backup_sweep.go +++ b/spinifex/handlers/rds/backup_sweep.go @@ -10,7 +10,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/handlers/rds/backup_sweep_test.go b/spinifex/handlers/rds/backup_sweep_test.go index cd045cb8e..545309c9b 100644 --- a/spinifex/handlers/rds/backup_sweep_test.go +++ b/spinifex/handlers/rds/backup_sweep_test.go @@ -8,7 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go/jetstream" "github.com/stretchr/testify/assert" diff --git a/spinifex/handlers/rds/bootstrap.go b/spinifex/handlers/rds/bootstrap.go index 791d6485a..d1e8bb75d 100644 --- a/spinifex/handlers/rds/bootstrap.go +++ b/spinifex/handlers/rds/bootstrap.go @@ -11,7 +11,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" ) diff --git a/spinifex/handlers/rds/create.go b/spinifex/handlers/rds/create.go index c1a9b4589..8b3dd9a40 100644 --- a/spinifex/handlers/rds/create.go +++ b/spinifex/handlers/rds/create.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/handlers/rds/delete.go b/spinifex/handlers/rds/delete.go index 8f67a0d96..cade3c1ac 100644 --- a/spinifex/handlers/rds/delete.go +++ b/spinifex/handlers/rds/delete.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/handlers/sysinstance" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" "github.com/mulgadc/spinifex/spinifex/utils" ) diff --git a/spinifex/handlers/rds/describe.go b/spinifex/handlers/rds/describe.go index 9db7fb7e0..8dfaf3754 100644 --- a/spinifex/handlers/rds/describe.go +++ b/spinifex/handlers/rds/describe.go @@ -8,7 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // The prefix AWS gives a DB instance's immutable resource ID, and the two filter diff --git a/spinifex/handlers/rds/dns.go b/spinifex/handlers/rds/dns.go index 9a2ee21b6..4e310a252 100644 --- a/spinifex/handlers/rds/dns.go +++ b/spinifex/handlers/rds/dns.go @@ -5,7 +5,7 @@ import ( "log/slog" handlers_dns "github.com/mulgadc/spinifex/spinifex/handlers/dns" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // The vanity hostname for a DB instance, or "" on a deployment with no base diff --git a/spinifex/handlers/rds/events.go b/spinifex/handlers/rds/events.go index 679a3dc70..27890caa1 100644 --- a/spinifex/handlers/rds/events.go +++ b/spinifex/handlers/rds/events.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // The event ring is the only channel some facts have to the customer — a backup diff --git a/spinifex/handlers/rds/lifecycle.go b/spinifex/handlers/rds/lifecycle.go index 4f9907e42..9a619e036 100644 --- a/spinifex/handlers/rds/lifecycle.go +++ b/spinifex/handlers/rds/lifecycle.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" handlers_ec2_instance "github.com/mulgadc/spinifex/spinifex/handlers/ec2/instance" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/types" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go" diff --git a/spinifex/handlers/rds/modify.go b/spinifex/handlers/rds/modify.go index d843daeb8..efe28a8ea 100644 --- a/spinifex/handlers/rds/modify.go +++ b/spinifex/handlers/rds/modify.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // The resolved effect of a ModifyDBInstance request: what changes now and what diff --git a/spinifex/handlers/rds/modify_lease.go b/spinifex/handlers/rds/modify_lease.go index 395e269b0..61609ccb6 100644 --- a/spinifex/handlers/rds/modify_lease.go +++ b/spinifex/handlers/rds/modify_lease.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // Applying PendingModifiedValues is the one control-plane operation with two diff --git a/spinifex/handlers/rds/modify_test.go b/spinifex/handlers/rds/modify_test.go index c31000143..e0036edbc 100644 --- a/spinifex/handlers/rds/modify_test.go +++ b/spinifex/handlers/rds/modify_test.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" iammock "github.com/mulgadc/spinifex/spinifex/handlers/iam/mock" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats.go" "github.com/stretchr/testify/assert" diff --git a/spinifex/handlers/rds/network.go b/spinifex/handlers/rds/network.go index 9b4b82f26..c519170f1 100644 --- a/spinifex/handlers/rds/network.go +++ b/spinifex/handlers/rds/network.go @@ -8,7 +8,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/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // The customer-account VPC surface CreateDBInstance reads to place the endpoint diff --git a/spinifex/handlers/rds/parametergroup.go b/spinifex/handlers/rds/parametergroup.go index cb36f01ab..cc185e3e5 100644 --- a/spinifex/handlers/rds/parametergroup.go +++ b/spinifex/handlers/rds/parametergroup.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // AWS's cap on one ModifyDBParameterGroup call. diff --git a/spinifex/handlers/rds/pending.go b/spinifex/handlers/rds/pending.go index 8e6cd296e..d7fa92ee4 100644 --- a/spinifex/handlers/rds/pending.go +++ b/spinifex/handlers/rds/pending.go @@ -7,7 +7,7 @@ import ( "log/slog" "github.com/aws/aws-sdk-go/aws" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // The single drain for everything a modify recorded but has not delivered. Both diff --git a/spinifex/handlers/rds/reconciler.go b/spinifex/handlers/rds/reconciler.go index f190103ba..8bba31572 100644 --- a/spinifex/handlers/rds/reconciler.go +++ b/spinifex/handlers/rds/reconciler.go @@ -12,7 +12,7 @@ import ( "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/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/reconciler" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/rds/recovery.go b/spinifex/handlers/rds/recovery.go index 1668111b7..05f8a808a 100644 --- a/spinifex/handlers/rds/recovery.go +++ b/spinifex/handlers/rds/recovery.go @@ -7,7 +7,7 @@ import ( "log/slog" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // How long an instance may be observed dark before it is called failed, unless diff --git a/spinifex/handlers/rds/replace.go b/spinifex/handlers/rds/replace.go index fd67d592b..6cb8e37d4 100644 --- a/spinifex/handlers/rds/replace.go +++ b/spinifex/handlers/rds/replace.go @@ -6,7 +6,7 @@ import ( "fmt" "log/slog" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" ) diff --git a/spinifex/handlers/rds/restore.go b/spinifex/handlers/rds/restore.go index 6e02389cd..760e603b7 100644 --- a/spinifex/handlers/rds/restore.go +++ b/spinifex/handlers/rds/restore.go @@ -11,7 +11,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" "github.com/mulgadc/spinifex/spinifex/utils" ) diff --git a/spinifex/handlers/rds/service.go b/spinifex/handlers/rds/service.go index a64833e3d..deaecd50a 100644 --- a/spinifex/handlers/rds/service.go +++ b/spinifex/handlers/rds/service.go @@ -11,7 +11,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/admin" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/rds/snapshot.go b/spinifex/handlers/rds/snapshot.go index ad9e94ef4..2a2a09281 100644 --- a/spinifex/handlers/rds/snapshot.go +++ b/spinifex/handlers/rds/snapshot.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/aws/tags" "github.com/mulgadc/spinifex/spinifex/utils" ) diff --git a/spinifex/handlers/rds/store.go b/spinifex/handlers/rds/store.go index ed0cd0db4..482896c55 100644 --- a/spinifex/handlers/rds/store.go +++ b/spinifex/handlers/rds/store.go @@ -12,7 +12,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/kvlease" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/nats-io/nats.go" diff --git a/spinifex/handlers/rds/subnetgroup.go b/spinifex/handlers/rds/subnetgroup.go index 916697d07..514acbba9 100644 --- a/spinifex/handlers/rds/subnetgroup.go +++ b/spinifex/handlers/rds/subnetgroup.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // AWS's own name rules. The name is a KV key rather than a DNS label, so the diff --git a/spinifex/handlers/rds/tags.go b/spinifex/handlers/rds/tags.go index b437fcaf1..61441d82d 100644 --- a/spinifex/handlers/rds/tags.go +++ b/spinifex/handlers/rds/tags.go @@ -11,7 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/rds" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // AWS's own tag limits. The reserved prefix is refused rather than dropped: a diff --git a/spinifex/handlers/sts/assume_role.go b/spinifex/handlers/sts/assume_role.go index 1dac954d0..f8b8cf5b5 100644 --- a/spinifex/handlers/sts/assume_role.go +++ b/spinifex/handlers/sts/assume_role.go @@ -24,7 +24,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" ) diff --git a/spinifex/handlers/sts/service_impl.go b/spinifex/handlers/sts/service_impl.go index fe25b12d0..7520d471d 100644 --- a/spinifex/handlers/sts/service_impl.go +++ b/spinifex/handlers/sts/service_impl.go @@ -7,7 +7,7 @@ import ( "log/slog" handlers_iam "github.com/mulgadc/spinifex/spinifex/handlers/iam" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/handlers/sts/session_credentials.go b/spinifex/handlers/sts/session_credentials.go index 1a27b6e86..7f74cf8de 100644 --- a/spinifex/handlers/sts/session_credentials.go +++ b/spinifex/handlers/sts/session_credentials.go @@ -12,7 +12,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/handlers/sts/session_credentials_test.go b/spinifex/handlers/sts/session_credentials_test.go index af7712d07..1ce66839d 100644 --- a/spinifex/handlers/sts/session_credentials_test.go +++ b/spinifex/handlers/sts/session_credentials_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/mulgadc/spinifex/internal/testkit" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/state/kvutil" "github.com/nats-io/nats.go/jetstream" "github.com/stretchr/testify/assert" diff --git a/spinifex/instancecache/cache.go b/spinifex/instancecache/cache.go index ba37c8130..4ed17656b 100644 --- a/spinifex/instancecache/cache.go +++ b/spinifex/instancecache/cache.go @@ -33,7 +33,7 @@ import ( "time" instance "github.com/mulgadc/spinifex/spinifex/handlers/ec2/instance" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/instancecache/cache_test.go b/spinifex/instancecache/cache_test.go index b2ae72eb4..adb0521af 100644 --- a/spinifex/instancecache/cache_test.go +++ b/spinifex/instancecache/cache_test.go @@ -15,7 +15,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/foundation/lifecycle/resource" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/utils" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" diff --git a/spinifex/instancecache/liveness.go b/spinifex/instancecache/liveness.go index 497970f4f..3900bde38 100644 --- a/spinifex/instancecache/liveness.go +++ b/spinifex/instancecache/liveness.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/instancecache/liveness_test.go b/spinifex/instancecache/liveness_test.go index c3eadc8d6..6b5db3a86 100644 --- a/spinifex/instancecache/liveness_test.go +++ b/spinifex/instancecache/liveness_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/instancecache" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats.go/jetstream" "github.com/stretchr/testify/require" diff --git a/spinifex/instancecache/resume_from_revision_test.go b/spinifex/instancecache/resume_from_revision_test.go index 73b4c1acd..9ad455394 100644 --- a/spinifex/instancecache/resume_from_revision_test.go +++ b/spinifex/instancecache/resume_from_revision_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/internal/testkit" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go/jetstream" diff --git a/spinifex/network/external/ocinet/affinity.go b/spinifex/network/external/ocinet/affinity.go index e76c5b4e0..b72a2b9a9 100644 --- a/spinifex/network/external/ocinet/affinity.go +++ b/spinifex/network/external/ocinet/affinity.go @@ -6,7 +6,7 @@ import ( "fmt" "log/slog" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/topology" ) diff --git a/spinifex/network/external/ocinet/allocator.go b/spinifex/network/external/ocinet/allocator.go index 50e072139..eafa01a8b 100644 --- a/spinifex/network/external/ocinet/allocator.go +++ b/spinifex/network/external/ocinet/allocator.go @@ -33,7 +33,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/external" ) diff --git a/spinifex/network/external/ocinet/allocator_test.go b/spinifex/network/external/ocinet/allocator_test.go index 98779c38a..be3a243f8 100644 --- a/spinifex/network/external/ocinet/allocator_test.go +++ b/spinifex/network/external/ocinet/allocator_test.go @@ -12,7 +12,7 @@ import ( "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" ) diff --git a/spinifex/network/external/ocinet/lookup.go b/spinifex/network/external/ocinet/lookup.go index 01f0d1e66..dbd05700b 100644 --- a/spinifex/network/external/ocinet/lookup.go +++ b/spinifex/network/external/ocinet/lookup.go @@ -6,7 +6,7 @@ import ( "fmt" "net/netip" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // Lookup answers "what address does this external IP ride the wire as" from the diff --git a/spinifex/network/external/ocinet/reconcile.go b/spinifex/network/external/ocinet/reconcile.go index de38775a6..cc94b21c5 100644 --- a/spinifex/network/external/ocinet/reconcile.go +++ b/spinifex/network/external/ocinet/reconcile.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" ) // ReconcileResult reports what a pass found, so a caller can log it and a test diff --git a/spinifex/network/external/ocinet/reconcile_test.go b/spinifex/network/external/ocinet/reconcile_test.go index 9eabd620d..5f1959800 100644 --- a/spinifex/network/external/ocinet/reconcile_test.go +++ b/spinifex/network/external/ocinet/reconcile_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/mulgadc/spinifex/spinifex/providers/cloud/oci" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/external" "github.com/mulgadc/spinifex/spinifex/network/external/ocinet" ) diff --git a/spinifex/network/external/ocinet/store.go b/spinifex/network/external/ocinet/store.go index 94f0d1fa0..598652309 100644 --- a/spinifex/network/external/ocinet/store.go +++ b/spinifex/network/external/ocinet/store.go @@ -6,7 +6,7 @@ import ( "maps" "sync" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/network/external/static_pool.go b/spinifex/network/external/static_pool.go index 586fb35fe..b6d940df1 100644 --- a/spinifex/network/external/static_pool.go +++ b/spinifex/network/external/static_pool.go @@ -9,7 +9,7 @@ import ( "net/netip" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/migrate" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/network/reconcile/drift.go b/spinifex/network/reconcile/drift.go index 4b36d6c43..e6ec19893 100644 --- a/spinifex/network/reconcile/drift.go +++ b/spinifex/network/reconcile/drift.go @@ -12,7 +12,7 @@ import ( handlers_ec2_natgw "github.com/mulgadc/spinifex/spinifex/handlers/ec2/natgw" handlers_ec2_routetable "github.com/mulgadc/spinifex/spinifex/handlers/ec2/routetable" handlers_ec2_vpc "github.com/mulgadc/spinifex/spinifex/handlers/ec2/vpc" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" loop "github.com/mulgadc/spinifex/spinifex/reconciler" "github.com/nats-io/nats.go" diff --git a/spinifex/reconciler/reconciler.go b/spinifex/reconciler/reconciler.go index 39ea5b505..b0080e0a7 100644 --- a/spinifex/reconciler/reconciler.go +++ b/spinifex/reconciler/reconciler.go @@ -24,7 +24,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/foundation/aws/errors" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/foundation/telemetry" "github.com/nats-io/nats.go/jetstream" ) diff --git a/spinifex/reconciler/reconciler_test.go b/spinifex/reconciler/reconciler_test.go index 034dc8826..b870e4809 100644 --- a/spinifex/reconciler/reconciler_test.go +++ b/spinifex/reconciler/reconciler_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/reconciler" "github.com/mulgadc/spinifex/internal/testkit" "github.com/nats-io/nats.go" diff --git a/spinifex/runtime/compute/vm/mock/mock.go b/spinifex/runtime/compute/vm/mock/mock.go index 67c39291a..56a055d93 100644 --- a/spinifex/runtime/compute/vm/mock/mock.go +++ b/spinifex/runtime/compute/vm/mock/mock.go @@ -12,7 +12,7 @@ import ( "maps" "sync" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" ) diff --git a/spinifex/services/awsgw/awsgw.go b/spinifex/services/awsgw/awsgw.go index 63ed85ae0..f27c89c9e 100644 --- a/spinifex/services/awsgw/awsgw.go +++ b/spinifex/services/awsgw/awsgw.go @@ -33,7 +33,7 @@ import ( handlers_quota "github.com/mulgadc/spinifex/spinifex/handlers/quota" handlers_sts "github.com/mulgadc/spinifex/spinifex/handlers/sts" "github.com/mulgadc/spinifex/spinifex/instancecache" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/network/reconcile" "github.com/mulgadc/spinifex/spinifex/objectstore" "github.com/mulgadc/spinifex/spinifex/reconciler" diff --git a/spinifex/vpcd/imds_instance_state.go b/spinifex/vpcd/imds_instance_state.go index 60075a457..d9a99a1ce 100644 --- a/spinifex/vpcd/imds_instance_state.go +++ b/spinifex/vpcd/imds_instance_state.go @@ -8,7 +8,7 @@ import ( "time" "github.com/mulgadc/spinifex/spinifex/daemon" - "github.com/mulgadc/spinifex/spinifex/kvstore" + "github.com/mulgadc/spinifex/spinifex/foundation/state/kvstore" "github.com/mulgadc/spinifex/spinifex/runtime/compute/vm" "github.com/nats-io/nats.go" )