Documentation ¶
Index ¶
- Variables
- func GetAppContextResources(ac appcontext.AppContext, ch interface{}, qOutput string, fResources []string, ...) (int, error)
- func GetClusterResources(rbData rb.ResourceBundleStatus, qOutput string, fResources []string, ...) (int, error)
- type AppStatus
- type AppsListResult
- type ClusterEntry
- type ClusterStatus
- type ClusterStatusResult
- type ClustersByAppEntry
- type ClustersByAppResult
- type ResourceEntry
- type ResourceStatus
- type ResourcesByAppEntry
- type ResourcesByAppResult
- type StatusQueryParam
- type StatusResult
Constants ¶
This section is empty.
Variables ¶
var StatusQueryEnum = &queryparams{
Instance: "instance",
Summary: "summary",
All: "all",
Detail: "detail",
Rsync: "rsync",
App: "app",
Cluster: "cluster",
Resource: "resource",
Apps: "apps",
Clusters: "clusters",
Resources: "resources",
}
StatusQueryEnum defines the set of valid query parameter strings
Functions ¶
func GetAppContextResources ¶
func GetAppContextResources(ac appcontext.AppContext, ch interface{}, qOutput string, fResources []string, resourceList *[]ResourceStatus, statusCnts map[string]int, app, cluster string) (int, error)
GetAppContextResources collects the resource status of all resources in an AppContext subject to the filter parameters
func GetClusterResources ¶
func GetClusterResources(rbData rb.ResourceBundleStatus, qOutput string, fResources []string, resourceList *[]ResourceStatus, cnts map[string]int) (int, error)
GetClusterResources takes in a ResourceBundleStatus CR and resturns a list of ResourceStatus elments
Types ¶
type AppStatus ¶
type AppStatus struct { Name string `json:"name,omitempty"` Clusters []ClusterStatus `json:"clusters,omitempty"` }
type AppsListResult ¶
type AppsListResult struct { Name string `json:"name,omitempty,inline"` Apps []string `json:"apps,inline"` }
AppsListResult returns a list of Apps for the given AppContext
func PrepareAppsListStatusResult ¶
func PrepareAppsListStatusResult(stateInfo state.StateInfo, qInstance string) (AppsListResult, error)
PrepareAppsListStatusResult takes in a resource stateInfo object, the list of apps and the query parameters. It then fills out the StatusResult structure appropriately from information in the AppContext
type ClusterEntry ¶
type ClusterStatus ¶
type ClusterStatus struct { ClusterProvider string `json:"cluster-provider,omitempty"` Cluster string `json:"cluster,omitempty"` ReadyStatus string `json:"readystatus,omitempty"` Resources []ResourceStatus `json:"resources,omitempty"` }
type ClusterStatusResult ¶
type ClusterStatusResult struct { Name string `json:"name,omitempty,inline"` State state.StateInfo `json:"states,omitempty,inline"` Status appcontext.StatusValue `json:"status,omitempty,inline"` RsyncStatus map[string]int `json:"rsync-status,omitempty,inline"` ClusterStatus map[string]int `json:"cluster-status,omitempty,inline"` Cluster ClusterStatus `json:"cluster,omitempty,inline"` }
func PrepareClusterStatusResult ¶
func PrepareClusterStatusResult(stateInfo state.StateInfo, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (ClusterStatusResult, error)
PrepareClusterStatusResult takes in a resource stateInfo object, the list of apps and the query parameters. It then fills out the StatusResult structure appropriately from information in the AppContext
type ClustersByAppEntry ¶
type ClustersByAppEntry struct { App string `json:"app"` Clusters []ClusterEntry `json:"clusters"` }
type ClustersByAppResult ¶
type ClustersByAppResult struct { Name string `json:"name,omitempty,inline"` ClustersByApp []ClustersByAppEntry `json:"clusters-by-app"` }
ClustersByAppResult holds an array of clusters to which app's are deployed
func PrepareClustersByAppStatusResult ¶
func PrepareClustersByAppStatusResult(stateInfo state.StateInfo, qInstance string, fApps []string) (ClustersByAppResult, error)
prepareStatusResult takes in a resource stateInfo object, the list of apps and the query parameters. It then fills out the StatusResult structure appropriately from information in the AppContext
type ResourceEntry ¶
type ResourceEntry struct { Name string `json:"name,omitempty"` Gvk schema.GroupVersionKind `json:"GVK,omitempty"` }
type ResourceStatus ¶
type ResourceStatus struct { Gvk schema.GroupVersionKind `json:"GVK,omitempty"` Name string `json:"name,omitempty"` Detail interface{} `json:"detail,omitempty"` RsyncStatus string `json:"rsync-status,omitempty"` ClusterStatus string `json:"cluster-status,omitempty"` }
type ResourcesByAppEntry ¶
type ResourcesByAppEntry struct { App string `json:"app,omitempty"` ClusterProvider string `json:"cluster-provider,omitempty"` Cluster string `json:"cluster,omitempty"` Resources []ResourceEntry `json:"resources"` }
type ResourcesByAppResult ¶
type ResourcesByAppResult struct { Name string `json:"name,omitempty,inline"` ResourcesByApp []ResourcesByAppEntry `json:"resources-by-app"` }
ResourcesByAppResult hols an array of resources associated by app
func PrepareResourcesByAppStatusResult ¶
func PrepareResourcesByAppStatusResult(stateInfo state.StateInfo, qInstance, qType string, fApps, fClusters []string) (ResourcesByAppResult, error)
PrepareResourcesByAppStatusResult takes in a resource stateInfo object, the list of apps and the query parameters. It then fills out the ResourcesByAppStatusResult structure appropriately from information in the AppContext
type StatusQueryParam ¶
type StatusQueryParam = string
StatusQueryParam defines the type of the query parameter
type StatusResult ¶
type StatusResult struct { Name string `json:"name,omitempty,inline"` State state.StateInfo `json:"states,omitempty,inline"` Status appcontext.StatusValue `json:"status,omitempty,inline"` RsyncStatus map[string]int `json:"rsync-status,omitempty,inline"` ClusterStatus map[string]int `json:"cluster-status,omitempty,inline"` Apps []AppStatus `json:"apps,omitempty,inline"` ChildContextIDs []string `json:"ChildContextIDs,omitempty,inline"` }
func PrepareStatusResult ¶
func PrepareStatusResult(stateInfo state.StateInfo, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (StatusResult, error)
PrepareStatusResult takes in a resource stateInfo object, the list of apps and the query parameters. It then fills out the StatusResult structure appropriately from information in the AppContext