Documentation ¶
Overview ¶
Package pluginsupplier provides installed plugins information
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterPluginsByActiveContextType ¶ added in v1.3.0
func FilterPluginsByActiveContextType(plugins []cli.PluginInfo) (result []cli.PluginInfo, err error)
FilterPluginsByActiveContextType will exclude any plugin with an explicit setting of supportedContextType that does not match the type of any active CLI context Separating this conditional check so GetInstalledPlugins can continue to return all installed plugins regardless of supportedContextType
func GetInstalledPlugins ¶
func GetInstalledPlugins() ([]cli.PluginInfo, error)
GetInstalledPlugins return the installed plugins
func IsPluginActive ¶ added in v1.3.0
func IsPluginActive(pi *cli.PluginInfo) bool
IsPluginActive returns true if specified plugin is active
Plugin being activated means it is available as Tanzu CLI commands. Some plugins are activated conditionally based on a the plugin descriptor. If plugin is not active, even if the plugin is installed, it is not available as the Tanzu CLI commands for users to use.
For example: If PluginDescription.SupportedContextType is specified for the plugin, the plugin is only active if the SupportedContextType mentioned with PluginDescription is active in Tanzu CLI contexts. Reference: https://github.com/vmware-tanzu/tanzu-plugin-runtime/blob/main/plugin/types.go#L117
func IsPluginInstalled ¶ added in v1.3.0
func IsPluginInstalled(name string, target configtypes.Target, version string) bool
IsPluginInstalled returns true if plugin is already installed
Types ¶
This section is empty.