Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineJac committed Nov 8, 2023
1 parent dec0a5e commit 43fef7c
Show file tree
Hide file tree
Showing 5 changed files with 5,526 additions and 22 deletions.
13 changes: 13 additions & 0 deletions cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,19 @@ func syncMain(ctx context.Context, filenames []string, dry bool, parallelism,
dumpConfig.IsConsumerGroupScopedPluginSupported = true
}

if dumpConfig.LookUpSelectorTagsConsumers != nil {
consumersGlobal, err := dump.GetAllConsumers(ctx, kongClient, dumpConfig.LookUpSelectorTagsConsumers)
if err != nil {
fmt.Printf("Error retrieving global consumers: %v\n", err)
}
for _, c := range consumersGlobal {
targetContent.Consumers = append(targetContent.Consumers, file.FConsumer{Consumer: *c})
if err != nil {
fmt.Printf("Error adding global consumer %v: %v\n", *c.Username, err)
}
}
}

// read the current state
var currentState *state.KongState
if workspaceExists {
Expand Down
Loading

0 comments on commit 43fef7c

Please sign in to comment.