Documentation ¶
Index ¶
- Constants
- Variables
- type AppContext
- func (ac *AppContext) AddApp(handle interface{}, appname string) (interface{}, error)
- func (ac *AppContext) AddCluster(handle interface{}, clustername string) (interface{}, error)
- func (ac *AppContext) AddClusterMetaGrp(ch interface{}, gn string) error
- func (ac *AppContext) AddCompositeAppMeta(meta interface{}) error
- func (ac *AppContext) AddInstruction(handle interface{}, level string, insttype string, value interface{}) (interface{}, error)
- func (ac *AppContext) AddLevelValue(handle interface{}, level string, value interface{}) (interface{}, error)
- func (ac *AppContext) AddResource(handle interface{}, resname string, value interface{}) (interface{}, error)
- func (ac *AppContext) CreateCompositeApp() (interface{}, error)
- func (ac *AppContext) DeleteApp(handle interface{}) error
- func (ac *AppContext) DeleteCluster(handle interface{}) error
- func (ac *AppContext) DeleteClusterMetaGrpHandle(ch interface{}) error
- func (ac *AppContext) DeleteCompositeApp() error
- func (ac *AppContext) DeleteInstruction(handle interface{}) error
- func (ac *AppContext) GetAllHandles(handle interface{}) ([]interface{}, error)
- func (ac *AppContext) GetAppHandle(appname string) (interface{}, error)
- func (ac *AppContext) GetAppInstruction(insttype string) (interface{}, error)
- func (ac *AppContext) GetClusterGroupMap(an string) (map[string][]string, error)
- func (ac *AppContext) GetClusterHandle(appname string, clustername string) (interface{}, error)
- func (ac *AppContext) GetClusterMetaHandle(app string, cluster string) (string, error)
- func (ac *AppContext) GetClusterNames(appname string) ([]string, error)
- func (ac *AppContext) GetClusterStatusHandle(appname string, clustername string) (interface{}, error)
- func (ac *AppContext) GetCompositeAppHandle() (interface{}, error)
- func (ac *AppContext) GetCompositeAppMeta() (CompositeAppMeta, error)
- func (ac *AppContext) GetLevelHandle(handle interface{}, level string) (interface{}, error)
- func (ac *AppContext) GetResourceHandle(appname string, clustername string, resname string) (interface{}, error)
- func (ac *AppContext) GetResourceInstruction(appname string, clustername string, insttype string) (interface{}, error)
- func (ac *AppContext) GetResourceNames(appname string, clustername string) ([]string, error)
- func (ac *AppContext) GetResourceStatusHandle(appname string, clustername string, resname string) (interface{}, error)
- func (ac *AppContext) GetValue(handle interface{}) (interface{}, error)
- func (ac *AppContext) InitAppContext() (interface{}, error)
- func (ac *AppContext) LoadAppContext(cid interface{}) (interface{}, error)
- func (ac *AppContext) UpdateInstructionValue(handle interface{}, value interface{}) error
- func (ac *AppContext) UpdateResourceValue(handle interface{}, value interface{}) error
- func (ac *AppContext) UpdateStatusValue(handle interface{}, value interface{}) error
- func (ac *AppContext) UpdateValue(handle interface{}, value interface{}) error
- type AppContextStatus
- type CompositeAppMeta
- type StatusValue
Constants ¶
const AppLevel = "app"
const DependencyInstruction = "dependency"
DependencyInstruction type constants
const OrderInstruction = "order"
OrderInstruction type constants
const ResourceLevel = "resource"
Level constant names
const Separator = "+"
Separator is a constant used to create concatenated names for items like cluster or resource names
Variables ¶
var AppContextStatusEnum = &statuses{
Instantiating: "Instantiating",
Instantiated: "Instantiated",
Terminating: "Terminating",
Terminated: "Terminated",
InstantiateFailed: "InstantiateFailed",
TerminateFailed: "TerminateFailed",
Created: "Created",
Updating: "Updating",
Updated: "Updated",
UpdateFailed: "UpdatedFailed",
}
var ClusterReadyStatusEnum = &clusterStatuses{
Unknown: "Unknown",
Available: "Available",
Retrying: "Retrying",
}
Functions ¶
This section is empty.
Types ¶
type AppContext ¶
type AppContext struct {
// contains filtered or unexported fields
}
func (*AppContext) AddApp ¶
func (ac *AppContext) AddApp(handle interface{}, appname string) (interface{}, error)
Add app to the context under composite app
func (*AppContext) AddCluster ¶
func (ac *AppContext) AddCluster(handle interface{}, clustername string) (interface{}, error)
AddCluster helps to add cluster to the context under app. It takes in the app handle and clusterName as value.
func (*AppContext) AddClusterMetaGrp ¶
func (ac *AppContext) AddClusterMetaGrp(ch interface{}, gn string) error
AddClusterMetaGrp adds the meta info of groupNumber to which a cluster belongs. It takes in cluster handle and groupNumber as arguments
func (*AppContext) AddCompositeAppMeta ¶
func (ac *AppContext) AddCompositeAppMeta(meta interface{}) error
AddCompositeAppMeta adds the meta data associated with a composite app
func (*AppContext) AddInstruction ¶
func (ac *AppContext) AddInstruction(handle interface{}, level string, insttype string, value interface{}) (interface{}, error)
Add instruction under given handle and type
func (*AppContext) AddLevelValue ¶
func (ac *AppContext) AddLevelValue(handle interface{}, level string, value interface{}) (interface{}, error)
AddLevelValue for holding a state object at a given level will make a handle with an appended "<level>/" to the key
func (*AppContext) AddResource ¶
func (ac *AppContext) AddResource(handle interface{}, resname string, value interface{}) (interface{}, error)
Add resource under app and cluster
func (*AppContext) CreateCompositeApp ¶
func (ac *AppContext) CreateCompositeApp() (interface{}, error)
CreateCompositeApp method returns composite app handle as interface.
func (*AppContext) DeleteApp ¶
func (ac *AppContext) DeleteApp(handle interface{}) error
Delete app from the context and everything underneth
func (*AppContext) DeleteCluster ¶
func (ac *AppContext) DeleteCluster(handle interface{}) error
Delete cluster from the context and everything underneth
func (*AppContext) DeleteClusterMetaGrpHandle ¶
func (ac *AppContext) DeleteClusterMetaGrpHandle(ch interface{}) error
DeleteClusterMetaGrpHandle deletes the group number to which the cluster belongs, it takes in the cluster handle.
func (*AppContext) DeleteCompositeApp ¶
func (ac *AppContext) DeleteCompositeApp() error
Deletes the entire context
func (*AppContext) DeleteInstruction ¶
func (ac *AppContext) DeleteInstruction(handle interface{}) error
Delete instruction under given handle
func (*AppContext) GetAllHandles ¶
func (ac *AppContext) GetAllHandles(handle interface{}) ([]interface{}, error)
Return all the handles under the composite app
func (*AppContext) GetAppHandle ¶
func (ac *AppContext) GetAppHandle(appname string) (interface{}, error)
Returns the handle for a given app
func (*AppContext) GetAppInstruction ¶
func (ac *AppContext) GetAppInstruction(insttype string) (interface{}, error)
Returns the app instruction for a given instruction type
func (*AppContext) GetClusterGroupMap ¶
func (ac *AppContext) GetClusterGroupMap(an string) (map[string][]string, error)
GetClusterGroupMap shall take in appName and return a map showing the grouping among the clusters. sample output of "GroupMap" :{"1":["cluster_provider1+clusterName3","cluster_provider1+clusterName5"],"2":["cluster_provider2+clusterName4","cluster_provider2+clusterName6"]}
func (*AppContext) GetClusterHandle ¶
func (ac *AppContext) GetClusterHandle(appname string, clustername string) (interface{}, error)
Returns the handle for a given app and cluster
func (*AppContext) GetClusterMetaHandle ¶
func (ac *AppContext) GetClusterMetaHandle(app string, cluster string) (string, error)
GetClusterMetaHandle takes in appName and ClusterName as string arguments and return the ClusterMetaHandle as string
func (*AppContext) GetClusterNames ¶
func (ac *AppContext) GetClusterNames(appname string) ([]string, error)
Returns a list of all clusters for a given app
func (*AppContext) GetClusterStatusHandle ¶
func (ac *AppContext) GetClusterStatusHandle(appname string, clustername string) (interface{}, error)
GetClusterStatusHandle returns the handle for cluster status for a given app and cluster
func (*AppContext) GetCompositeAppHandle ¶
func (ac *AppContext) GetCompositeAppHandle() (interface{}, error)
Returns the handles for a given composite app context
func (*AppContext) GetCompositeAppMeta ¶
func (ac *AppContext) GetCompositeAppMeta() (CompositeAppMeta, error)
GetCompositeAppMeta returns the meta data associated with the compositeApp Its return type is CompositeAppMeta
func (*AppContext) GetLevelHandle ¶
func (ac *AppContext) GetLevelHandle(handle interface{}, level string) (interface{}, error)
GetLevelHandle returns the handle for the supplied level at the given handle. For example, to get the handle of the 'status' level at a given handle.
func (*AppContext) GetResourceHandle ¶
func (ac *AppContext) GetResourceHandle(appname string, clustername string, resname string) (interface{}, error)
Return the handle for given app, cluster and resource name
func (*AppContext) GetResourceInstruction ¶
func (ac *AppContext) GetResourceInstruction(appname string, clustername string, insttype string) (interface{}, error)
Returns the resource instruction for a given instruction type
func (*AppContext) GetResourceNames ¶
func (ac *AppContext) GetResourceNames(appname string, clustername string) ([]string, error)
GetResourceNames ... Returns a list of all resource names for a given app
func (*AppContext) GetResourceStatusHandle ¶
func (ac *AppContext) GetResourceStatusHandle(appname string, clustername string, resname string) (interface{}, error)
Return the handle for given app, cluster and resource name
func (*AppContext) GetValue ¶
func (ac *AppContext) GetValue(handle interface{}) (interface{}, error)
Returns the value for a given handle
func (*AppContext) InitAppContext ¶
func (ac *AppContext) InitAppContext() (interface{}, error)
Init app context
func (*AppContext) LoadAppContext ¶
func (ac *AppContext) LoadAppContext(cid interface{}) (interface{}, error)
Load app context that was previously created
func (*AppContext) UpdateInstructionValue ¶
func (ac *AppContext) UpdateInstructionValue(handle interface{}, value interface{}) error
Update the instruction usign the given handle
func (*AppContext) UpdateResourceValue ¶
func (ac *AppContext) UpdateResourceValue(handle interface{}, value interface{}) error
Update the resource value using the given handle
func (*AppContext) UpdateStatusValue ¶
func (ac *AppContext) UpdateStatusValue(handle interface{}, value interface{}) error
UpdateStatusValue updates the status value with the given handle
func (*AppContext) UpdateValue ¶
func (ac *AppContext) UpdateValue(handle interface{}, value interface{}) error
UpdateValue updates the state value with the given handle
type AppContextStatus ¶
type AppContextStatus struct {
Status StatusValue
}
AppContextStatus represents the current status of the appcontext
Instantiating - instantiate has been invoked and is still in progress Instantiated - instantiate has completed Terminating - terminate has been invoked and is still in progress Terminated - terminate has completed InstantiateFailed - the instantiate action has failed TerminateFailed - the terminate action has failed
type CompositeAppMeta ¶
type CompositeAppMeta struct { Project string `json:"Project"` CompositeApp string `json:"CompositeApp"` Version string `json:"Version"` Release string `json:"Release"` DeploymentIntentGroup string `json:"DeploymentIntentGroup"` Namespace string `json:"Namespace"` Level string `json:"Level"` ChildContextIDs []string `json:"ChildContextIDs"` }
CompositeAppMeta consists of projectName, CompositeAppName, CompositeAppVersion, ReleaseName. This shall be used for instantiation of a compositeApp
type StatusValue ¶
type StatusValue string