-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
microcluster/example: Add API extension manipulation examples
* Show how we can add API extensions at daemon startup (`example/api/extensions.go`) * Show how we can manipulate API extensions within hooks. Signed-off-by: Gabriel Mougard <[email protected]>
- Loading branch information
1 parent
2a56296
commit 85c6b85
Showing
2 changed files
with
50 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package api | ||
|
||
// These are the extensions that are present when the daemon starts. | ||
var extensions = []string{ | ||
"custom_extension_a_0", | ||
"custom_extension_a_1", | ||
} | ||
|
||
// Extensions returns the list of MicroOVN extensions. | ||
func Extensions() []string { | ||
return extensions | ||
} |
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