Created
October 11, 2023 09:40
-
-
Save salaboy/1c9dba30968164645088fd3fe230c979 to your computer and use it in GitHub Desktop.
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
Map.ofEntries( | |
Map.entry("apiVersion", "dapr.io/v1alpha1"), | |
Map.entry("kind", "Component"), | |
Map.entry( | |
"metadata", Map.ofEntries( | |
Map.entry("name", component.name) | |
) | |
), | |
Map.entry("spec", Map.ofEntries( | |
Map.entry("type", component.type), | |
Map.entry("version", "v1"), | |
Map.entry( | |
"metadata", | |
component.metadata.entrySet() | |
.stream() | |
.map(it -> Map.of("name", it.getKey(), "value", it.getValue())) | |
.toList() | |
) | |
)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment