Skip to content

Commit

Permalink
renamed cluster to client
Browse files Browse the repository at this point in the history
  • Loading branch information
brunodeluk committed Apr 20, 2022
1 parent 74e3f9f commit 8a9e40c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cluster
package client

import "context"

type Cluster interface {
type Client interface {
Apply(ctx context.Context, path string) error
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cluster
package client

import (
"bufio"
Expand Down
6 changes: 3 additions & 3 deletions configmanager/configmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 8a9e40c

Please sign in to comment.