Documentation ¶
Overview ¶
Package discovery is implements discovery interface for plugin discovery Discovery is the interface to fetch the list of available plugins, their supported versions and how to download them either stand-alone or scoped to a server. A separate interface for discovery helps to decouple discovery (which is usually tied to a server or user identity) from distribution (which can be shared).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoveredFromK8sV1alpha1 ¶
func DiscoveredFromK8sV1alpha1(p *cliv1alpha1.CLIPlugin) plugin.Discovered
DiscoveredFromK8sV1alpha1 returns discovered plugin object from k8sV1alpha1
Types ¶
type Discovery ¶
type Discovery interface { // Name of the repository. Name() string // List available plugins. List() ([]plugin.Discovered, error) // Describe a plugin. Describe(name string) (plugin.Discovered, error) // Type returns type of discovery. Type() string }
Discovery is the interface to fetch the list of available plugins
func CreateDiscoveryFromV1alpha1 ¶
func CreateDiscoveryFromV1alpha1(pd v1alpha1.PluginDiscovery) (Discovery, error)
CreateDiscoveryFromV1alpha1 creates discovery interface from v1alpha1 API
func NewGCPDiscovery ¶
NewGCPDiscovery returns a new GCP bucket repository.
func NewLocalDiscovery ¶
NewLocalDiscovery returns a new local repository. If provided localPath is not an absolute path search under `xdg.ConfigHome/tanzu-plugin/discovery` directory
func NewOCIDiscovery ¶
NewOCIDiscovery returns a new local repository.
type GCPDiscovery ¶
type GCPDiscovery struct {
// contains filtered or unexported fields
}
GCPDiscovery is a artifact discovery endpoing utilizing a GCP bucket.
func (*GCPDiscovery) Describe ¶
func (g *GCPDiscovery) Describe(name string) (p plugin.Discovered, err error)
Describe a plugin.
func (*GCPDiscovery) List ¶
func (g *GCPDiscovery) List() (plugins []plugin.Discovered, err error)
List available plugins.
type LocalDiscovery ¶
type LocalDiscovery struct {
// contains filtered or unexported fields
}
LocalDiscovery is a artifact discovery endpoint utilizing a local host os.
func (*LocalDiscovery) Describe ¶
func (l *LocalDiscovery) Describe(name string) (p plugin.Discovered, err error)
Describe a plugin.
func (*LocalDiscovery) List ¶
func (l *LocalDiscovery) List() ([]plugin.Discovered, error)
List available plugins.
func (*LocalDiscovery) Manifest ¶
func (l *LocalDiscovery) Manifest() ([]plugin.Discovered, error)
Manifest returns the manifest for a local repository.
type OCIDiscovery ¶
type OCIDiscovery struct {
// contains filtered or unexported fields
}
OCIDiscovery is a artifact discovery endpoint utilizing OCI image
func (*OCIDiscovery) Describe ¶
func (od *OCIDiscovery) Describe(name string) (p plugin.Discovered, err error)
Describe a plugin.
func (*OCIDiscovery) List ¶
func (od *OCIDiscovery) List() (plugins []plugin.Discovered, err error)
List available plugins.