Documentation ¶
Index ¶
- func AddUpdateData(c *models.Cluster, v AvailableComponentVersion) error
- func GetAvailableVersions(a AvailableVersions, cluster models.Cluster) ([]models.ComponentVersion, error)
- func GetCluster(c InstalledData, i ClusterID, v AvailableComponentVersion) (models.Cluster, error)
- func GetDoctorInfo(c InstalledData, k k8s.RunningK8sData, i ClusterID, ...) (models.DoctorInfo, error)
- func GetID(id ClusterID) (string, error)
- func GetInstalled(g InstalledData) (models.Cluster, error)
- func GetLatestVersion(component string, cluster models.Cluster, availVsns AvailableVersions) (models.Version, error)
- func NewestSemVer(v1 string, v2 string) (string, error)
- func ParseJSONCluster(rawJSON []byte) (models.Cluster, error)
- type AvailableComponentVersion
- type AvailableVersions
- type ClusterID
- type ComponentVersionsJSONWrapper
- type InstalledData
- type SparseComponentAndTrainInfo
- type SparseComponentAndTrainInfoJSONWrapper
- type SparseComponentInfo
- type SparseVersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddUpdateData ¶
func AddUpdateData(c *models.Cluster, v AvailableComponentVersion) error
AddUpdateData adds UpdateAvailable field data to cluster components Any cluster object modifications are made "in-place"
func GetAvailableVersions ¶
func GetAvailableVersions(a AvailableVersions, cluster models.Cluster) ([]models.ComponentVersion, error)
GetAvailableVersions gets available component version data from the cache. If there was a cache miss, gets the versions from the k8s and versions APIs
func GetCluster ¶
func GetCluster( c InstalledData, i ClusterID, v AvailableComponentVersion, ) (models.Cluster, error)
GetCluster collects all cluster metadata and returns a Cluster
func GetDoctorInfo ¶
func GetDoctorInfo( c InstalledData, k k8s.RunningK8sData, i ClusterID, v AvailableComponentVersion, ) (models.DoctorInfo, error)
GetDoctorInfo collects doctor info and return DoctorInfo struct
func GetInstalled ¶
func GetInstalled(g InstalledData) (models.Cluster, error)
GetInstalled collects all installed components and returns a Cluster
func GetLatestVersion ¶
func GetLatestVersion( component string, cluster models.Cluster, availVsns AvailableVersions, ) (models.Version, error)
GetLatestVersion returns the latest known version of a drycc component
func NewestSemVer ¶
NewestSemVer returns the newest (largest) semver string
Types ¶
type AvailableComponentVersion ¶
type AvailableComponentVersion interface { // will have a Get method to retrieve available component version data Get(component string, cluster models.Cluster) (models.Version, error) }
AvailableComponentVersion is an interface for managing component version data
func NewLatestReleasedComponent ¶
func NewLatestReleasedComponent( ri *k8s.ResourceInterfaceNamespaced, availableVersions AvailableVersions, ) AvailableComponentVersion
NewLatestReleasedComponent creates a new AvailableComponentVersion that gets the latest released component using sgc as the implementation to get and create secrets
type AvailableVersions ¶
type AvailableVersions interface { // Cached returns the internal cache of component versions. Returns the empty slice on a miss Cached() []models.ComponentVersion // Refresh gets the latest versions of each component listed in the given cluster Refresh(models.Cluster) ([]models.ComponentVersion, error) // Store stores the given slice of models.ComponentVersion in internal storage Store([]models.ComponentVersion) }
AvailableVersions is an interface for managing available component version data
func NewAvailableVersionsFromAPI ¶
func NewAvailableVersionsFromAPI( apiClient *apiclient.WorkflowManager, baseVersionsURL string, ) AvailableVersions
NewAvailableVersionsFromAPI returns a new AvailableVersions implementation that fetches its version information from a workflow manager API. It uses baseVersionsURL as the server address. If that parameter is passed as the empty string, uses config.Spec.VersionsAPIURL
type ClusterID ¶
type ClusterID interface { // will have a Get method to retrieve the cluster ID Get() (string, error) // Cached returns the internal cache of the cluster ID. returns the empty string on a miss Cached() string // StoreInCache stores the given string in the internal cluster ID cache StoreInCache(string) }
ClusterID is an interface for managing cluster ID data
func NewClusterIDFromPersistentStorage ¶
func NewClusterIDFromPersistentStorage(sgc k8s.KubeSecretGetterCreator) ClusterID
NewClusterIDFromPersistentStorage returns a new ClusterID implementation that uses the kubernetes API to get its cluster information
type ComponentVersionsJSONWrapper ¶
type ComponentVersionsJSONWrapper struct {
Data []models.ComponentVersion `json:"data"`
}
ComponentVersionsJSONWrapper is the JSON compatible struct that holds a slice of types.ComponentVersion structs
type InstalledData ¶
type InstalledData interface { // will have a Get method to retrieve installed data Get() ([]byte, error) }
InstalledData is an interface for managing installed cluster metadata
func NewInstalledDryccData ¶
func NewInstalledDryccData(ri *k8s.ResourceInterfaceNamespaced) InstalledData
NewInstalledDryccData returns a new InstalledDryccData using rcl as the rc.Lister implementation
type SparseComponentAndTrainInfo ¶
type SparseComponentAndTrainInfo struct { Component SparseComponentInfo `json:"component"` Version SparseVersionInfo `json:"version"` }
SparseComponentAndTrainInfo is the JSON compatible struct that holds a SparseComponentInfo and SparseVersionInfo
type SparseComponentAndTrainInfoJSONWrapper ¶
type SparseComponentAndTrainInfoJSONWrapper struct {
Data []SparseComponentAndTrainInfo `json:"data"`
}
SparseComponentAndTrainInfoJSONWrapper is the JSON compatible struct that holds a slice of SparseComponentAndTrainInfo structs
type SparseComponentInfo ¶
type SparseComponentInfo struct {
Name string `json:"name"`
}
SparseComponentInfo is the JSON compatible struct that holds limited data about a component
type SparseVersionInfo ¶
type SparseVersionInfo struct {
Train string `json:"train"`
}
SparseVersionInfo is the JSON compatible struct that holds limited data about a component version