refactor: move ECS agent runtime and credentials packages to the ECS agent tree

This commit is contained in:
joshsiv-mulga
2026-10-07 12:16:10 +10:00
parent 6db23689bc
commit 3c82c69ad7
22 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"strings"
"time"
"github.com/mulgadc/spinifex/cmd/ecs-agent/credentials"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/credentials"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
"github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"testing"
"time"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
)
func TestAgent_RunRegistersThenStopsOnContext(t *testing.T) {
+1 -1
View File
@@ -9,8 +9,8 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/mulgadc/spinifex/cmd/ecs-agent/credentials"
"github.com/mulgadc/spinifex/internal/ecsgw"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/credentials"
handlers_ecs "github.com/mulgadc/spinifex/spinifex/handlers/ecs"
"github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus"
)
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"testing"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/mulgadc/spinifex/cmd/ecs-agent/credentials"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/credentials"
handlers_ecs "github.com/mulgadc/spinifex/spinifex/handlers/ecs"
)
+1 -1
View File
@@ -13,9 +13,9 @@ import (
"sync"
"time"
"github.com/mulgadc/spinifex/cmd/ecs-agent/credentials"
"github.com/mulgadc/spinifex/internal/ecrauth"
"github.com/mulgadc/spinifex/internal/stsauth"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/credentials"
)
const (
+2 -2
View File
@@ -7,9 +7,9 @@ import (
"strings"
"sync"
"github.com/mulgadc/spinifex/cmd/ecs-agent/credentials"
"github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
"github.com/mulgadc/spinifex/internal/ecrauth"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/credentials"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
)
// ecrResolver implements runtime.Resolver by minting an ECR authorization token
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"testing"
"time"
"github.com/mulgadc/spinifex/cmd/ecs-agent/credentials"
"github.com/mulgadc/spinifex/spinifex/agents/ecs/credentials"
)
// stubCreds is a credentials.CredentialsProvider returning fixed creds or error.
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context"
"log/slog"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
"github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"testing"
"time"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
"github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"sync"
"time"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
)
// runtimeProbeTimeout bounds the liveness probe against a runtime the gate is
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"errors"
"testing"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
)
// TestRuntimeGate_DialsUntilTheSocketAnswers is the boot case the agent used to
+2 -2
View File
@@ -9,7 +9,7 @@ import (
"sync"
"time"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
handlers_ecs "github.com/mulgadc/spinifex/spinifex/handlers/ecs"
"github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus"
)
@@ -353,7 +353,7 @@ func containerStopTimeout(labels map[string]string) time.Duration {
}
// toRuntimeSystemControls maps the assign's sysctl pairs to the runtime
// package's own type, keeping cmd/ecs-agent/runtime decoupled from the ecs
// package's own type, keeping agents/ecs/runtime decoupled from the ecs
// handlers' bus package.
func toRuntimeSystemControls(in []bus.SystemControl) []ctrruntime.SystemControl {
if len(in) == 0 {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"testing"
"time"
ctrruntime "github.com/mulgadc/spinifex/cmd/ecs-agent/runtime"
ctrruntime "github.com/mulgadc/spinifex/spinifex/agents/ecs/runtime"
"github.com/mulgadc/spinifex/spinifex/handlers/ecs/bus"
)