-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(GlobalInsight): allow using GlobalInsightService in other places (
#7813) Allow using GlobalInsightService in other than API endpoint places - Modified GlobalInsightService to use ResourceStore instead of ResourceManager, as it didn't use any specific ResourceManager functionality. - Exposed GlobalInsightService in the Runtime and RuntimeBuilder interfaces. - Fixed the returned type of GlobalInsight endpoint to be JSON instead of text. Explanation: The GlobalInsightService was previously only accessible from API endpoint places. To allow it to be used in other places, such as Bootstrap plugins, it needed to be modified to use ResourceStore instead of ResourceManager. In addition, the GlobalInsightService needed to be exposed in the Runtime and RuntimeBuilder interfaces. This makes it available to a wider range of code, including Bootstrap plugins. Finally, the commit fixes the returned type of the GlobalInsight endpoint to be JSON instead of text. This is because JSON is the standard format for data exchange between web applications. Overall, this commit makes the GlobalInsightService more accessible and easier to use. Signed-off-by: Bart Smykla <[email protected]>
- Loading branch information
1 parent
3a1ad77
commit 25726ff
Showing
12 changed files
with
73 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...insights/cached_global_insight_service.go → ...linsight/cached_global_insight_service.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package insights | ||
package globalinsight | ||
|
||
import ( | ||
"context" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package globalinsight_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/kumahq/kuma/pkg/test" | ||
) | ||
|
||
func TestGlobalInsights(t *testing.T) { | ||
test.RunSpecs(t, "GlobalInsight Suite") | ||
} |
File renamed without changes.