diff --git a/configmanager/cluster/cluster.go b/configmanager/client/cluster.go similarity index 62% rename from configmanager/cluster/cluster.go rename to configmanager/client/cluster.go index 480c122..cc7b812 100644 --- a/configmanager/cluster/cluster.go +++ b/configmanager/client/cluster.go @@ -1,7 +1,7 @@ -package cluster +package client import "context" -type Cluster interface { +type Client interface { Apply(ctx context.Context, path string) error } diff --git a/configmanager/cluster/kubernetes.go b/configmanager/client/kubernetes.go similarity index 99% rename from configmanager/cluster/kubernetes.go rename to configmanager/client/kubernetes.go index 30803d7..7fdcb15 100644 --- a/configmanager/cluster/kubernetes.go +++ b/configmanager/client/kubernetes.go @@ -1,4 +1,4 @@ -package cluster +package client import ( "bufio" diff --git a/configmanager/configmanager.go b/configmanager/configmanager.go index 6866bab..e909d99 100644 --- a/configmanager/configmanager.go +++ b/configmanager/configmanager.go @@ -2,13 +2,13 @@ package configmanager import ( "context" - "github.com/brunodeluk/kube-config/configmanager/cluster" + "github.com/brunodeluk/kube-config/configmanager/client" ) type ConfigManager struct { - Cluster cluster.Cluster + Client client.Client } func (cm *ConfigManager) Apply(ctx context.Context, path string) error { - return cm.Cluster.Apply(ctx, path) + return cm.Client.Apply(ctx, path) } diff --git a/main.go b/main.go index 74226c2..b08b9c2 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "context" "fmt" - "github.com/brunodeluk/kube-config/configmanager/cluster" + "github.com/brunodeluk/kube-config/configmanager/client" "github.com/brunodeluk/kube-config/sourcemanager" "github.com/brunodeluk/kube-config/sourcemanager/source" "k8s.io/utils/env" @@ -27,7 +27,7 @@ func main() { } for _, path := range paths { - k8s := cluster.Kubernetes{} + k8s := client.Kubernetes{} err := k8s.Apply(context.Background(), path) if err != nil { fmt.Println(err)