status

package
v0.0.0-...-bb2f907 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 16 Imported by: 7

Documentation

Index

Constants

View Source
const CaCertQuery = "CaCertStatus"
View Source
const ClusterStatusQuery = "clusterStatus"

types of status queries

View Source
const DeploymentIntentGroupStatusQuery = "digStatus"
View Source
const LcStatusQuery = "lcStatus"

Variables

View Source
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

This section is empty.

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(ctx context.Context, 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 CaCertStatusResult

type CaCertStatusResult struct {
	Name           string                 `json:"name,omitempty,inline"`
	State          state.StateInfo        `json:"states,omitempty,inline"`
	DeployedStatus appcontext.StatusValue `json:"deployedStatus,omitempty,inline"`
	ReadyStatus    string                 `json:"readyStatus,omitempty,inline"`
	DeployedCounts map[string]int         `json:"deployedCounts,omitempty,inline"`
	ReadyCounts    map[string]int         `json:"readyCounts,omitempty,inline"`
	Clusters       []ClusterStatus        `json:"clusters,omitempty,inline"`
}

CaCertStatusResult holds the caCert enrollment or distribution status details

func PrepareCaCertStatusResult

func PrepareCaCertStatusResult(ctx context.Context, stateInfo state.StateInfo, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (CaCertStatusResult, error)

PrepareCaCertStatusResult takes in a caCert 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 ClusterEntry struct {
	ClusterProvider string `json:"clusterProvider"`
	Cluster         string `json:"cluster"`
}

type ClusterStatus

type ClusterStatus struct {
	ClusterProvider string           `json:"clusterProvider,omitempty"`
	Cluster         string           `json:"cluster,omitempty"`
	ReadyStatus     string           `json:"readyStatus,omitempty"` // deprecated - to be replaced with Connectivity
	Connectivity    string           `json:"connectivity,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"` // deprecated - to be replaced with DeployedStatus
	DeployedStatus appcontext.StatusValue `json:"deployedStatus,omitempty,inline"`
	ReadyStatus    string                 `json:"readyStatus,omitempty,inline"`
	RsyncStatus    map[string]int         `json:"rsyncStatus,omitempty,inline"`   // deprecated - to be replaced with DeployedCounts
	ClusterStatus  map[string]int         `json:"clusterStatus,omitempty,inline"` // deprecated - to be replaced with ClusterCounts
	DeployedCounts map[string]int         `json:"deployedCounts,omitempty,inline"`
	ReadyCounts    map[string]int         `json:"readyCounts,omitempty,inline"`
	Cluster        ClusterStatus          `json:"cluster,omitempty,inline"`
}

func PrepareClusterStatusResult

func PrepareClusterStatusResult(ctx context.Context, 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:"clustersByApp"`
}

ClustersByAppResult holds an array of clusters to which app's are deployed

func PrepareClustersByAppStatusResult

func PrepareClustersByAppStatusResult(ctx context.Context, 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 LogicalCloudClustersStatus

type LogicalCloudClustersStatus struct {
	Project             string `json:"project,omitempty"`
	LogicalCloud        string `json:"logicalCloud,omitempty"`
	ClustersByAppResult `json:",inline"`
}

LogicalCloudClustersStatus is the structure used to return the status of the Clusters that have been/were deployed for the Logical Cloud

type LogicalCloudResourcesStatus

type LogicalCloudResourcesStatus struct {
	Project              string `json:"project,omitempty"`
	LogicalCloud         string `json:"logicalCloud,omitempty"`
	ResourcesByAppResult `json:",inline"`
}

LogicalCloudResourcesStatus is the structure used to return the status of the resources that have been/were deployed for the DeploymentIntentGroup

type LogicalCloudStatus

type LogicalCloudStatus struct {
	Project      string `json:"project,omitempty"`
	LogicalCloud string `json:"logicalCloud,omitempty"`
	StatusResult `json:",inline"`
	Clusters     []ClusterStatus `json:"clusters,omitempty"`
}

DeploymentStatus is the structure used to return general status results for the Deployment Intent Group

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:"rsyncStatus,omitempty"`   // deprecated - to be replaced with DeployedStatus
	ClusterStatus  string                  `json:"clusterStatus,omitempty"` // deprecated - to be replaced with ReadyStatus
	DeployedStatus string                  `json:"deployedStatus,omitempty"`
	ReadyStatus    string                  `json:"readyStatus,omitempty"`
}

type ResourcesByAppEntry

type ResourcesByAppEntry struct {
	App             string          `json:"app,omitempty"`
	ClusterProvider string          `json:"clusterProvider,omitempty"`
	Cluster         string          `json:"cluster,omitempty"`
	Resources       []ResourceEntry `json:"resources"`
}

type ResourcesByAppResult

type ResourcesByAppResult struct {
	Name           string                `json:"name,omitempty,inline"`
	ResourcesByApp []ResourcesByAppEntry `json:"resourcesByApp"`
}

ResourcesByAppResult holds an array of resources associated by app

func PrepareResourcesByAppStatusResult

func PrepareResourcesByAppStatusResult(ctx context.Context, 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"` // deprecated
	DeployedStatus  appcontext.StatusValue `json:"deployedStatus,omitempty,inline"`
	ReadyStatus     string                 `json:"readyStatus,omitempty,inline"`
	RsyncStatus     map[string]int         `json:"rsyncStatus,omitempty,inline"`   // deprecated
	ClusterStatus   map[string]int         `json:"clusterStatus,omitempty,inline"` // deprecated
	DeployedCounts  map[string]int         `json:"deployedCounts,omitempty,inline"`
	ReadyCounts     map[string]int         `json:"readyCounts,omitempty,inline"`
	Apps            []AppStatus            `json:"apps,omitempty,inline"`
	ChildContextIDs []string               `json:"ChildContextIDs,omitempty,inline"`
}

func GenericPrepareStatusResult

func GenericPrepareStatusResult(ctx context.Context, statusType string, stateInfo state.StateInfo, qInstance, qType, qOutput string, fApps, fClusters, fResources []string) (StatusResult, error)

GenericPrepareStatusResult 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

func PrepareStatusResult

func PrepareStatusResult(ctx context.Context, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL