-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A DiscoveryBackend is the content management logic behind a plugin Discovery. This commit creates a DiscoveryBackend implementation for the SQLite backend of the Central Repository. The DiscoveryBackend support is included in the "discovery" package at the moment, so that it can use the Discovered type. Making the new DiscoveryBackend part of its own package would prevent it from using the Discovered type due to a cyclical dependency. This would force us to create yet another type to characterize plugins for the DiscoveryBackend to use. This new type would then need to be converted to the Discovered type by the Discovery. An alternative would be to move the Discovered type to its own package that could be imported by both the "discovery" package, and a new "discoverybackend" package. Signed-off-by: Marc Khouzam <kmarc@vmware.com>
- Loading branch information
1 parent
54e2364
commit 9b2edee
Showing
4 changed files
with
235 additions
and
180 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright 2023 VMware, Inc. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package discovery | ||
|
||
// DiscoveryBackend is the interface to extract plugin information from | ||
// a backend used for plugin discovery. | ||
type DiscoveryBackend interface { | ||
GetAllPlugins() ([]*Discovered, error) | ||
} |
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
Oops, something went wrong.