Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: James Milligan <james@omnant.co.uk>
  • Loading branch information
james-milligan committed Mar 2, 2023
1 parent 3f97357 commit 47331fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions pkg/sync/file/filepath_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
)

type Sync struct {
URI string

URI string
Logger *logger.Logger
ProviderArgs sync.ProviderArgs
// FileType indicates the file type e.g., json, yaml/yml etc.,
Expand Down
9 changes: 4 additions & 5 deletions pkg/sync/kubernetes/kubernetes_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ type Sync struct {
ProviderArgs sync.ProviderArgs
client client.Client
URI string
Source string
ready bool
}

Expand All @@ -39,7 +38,7 @@ func (k *Sync) ReSync(ctx context.Context, dataSync chan<- sync.DataSync) error
if err != nil {
return err
}
dataSync <- sync.DataSync{FlagData: fetch, Source: k.Source, Type: sync.ALL}
dataSync <- sync.DataSync{FlagData: fetch, Source: k.URI, Type: sync.ALL}
return nil
}

Expand All @@ -61,7 +60,7 @@ func (k *Sync) Sync(ctx context.Context, dataSync chan<- sync.DataSync) error {
return err
}

dataSync <- sync.DataSync{FlagData: fetch, Source: k.Source, Type: sync.ALL}
dataSync <- sync.DataSync{FlagData: fetch, Source: k.URI, Type: sync.ALL}

notifies := make(chan INotify)

Expand All @@ -81,7 +80,7 @@ func (k *Sync) Sync(ctx context.Context, dataSync chan<- sync.DataSync) error {
continue
}

dataSync <- sync.DataSync{FlagData: msg, Source: k.Source, Type: sync.ALL}
dataSync <- sync.DataSync{FlagData: msg, Source: k.URI, Type: sync.ALL}
case DefaultEventTypeModify:
k.Logger.Debug("Configuration modified")
msg, err := k.fetch(ctx)
Expand All @@ -90,7 +89,7 @@ func (k *Sync) Sync(ctx context.Context, dataSync chan<- sync.DataSync) error {
continue
}

dataSync <- sync.DataSync{FlagData: msg, Source: k.Source, Type: sync.ALL}
dataSync <- sync.DataSync{FlagData: msg, Source: k.URI, Type: sync.ALL}
case DefaultEventTypeDelete:
k.Logger.Debug("configuration deleted")
case DefaultEventTypeReady:
Expand Down

0 comments on commit 47331fc

Please sign in to comment.