Documentation
¶
Index ¶
- Constants
- func DeepEqual(x *Cluster, y *Cluster) bool
- func Equal(x *Cluster, y *Cluster) bool
- func GetClusterKey(clusterid string, poolname string) string
- func GetClusterPoolKey(poolname string) string
- type Cluster
- type ClusterList
- func (l *ClusterList) Append(c *Cluster)
- func (l *ClusterList) ClusterInList(c *Cluster) bool
- func (l *ClusterList) ClustersInStateIn(state ClusterState) *ClusterList
- func (l *ClusterList) ItemAt(index int) *Cluster
- func (l *ClusterList) Len() int
- func (l *ClusterList) List(filter func(c *Cluster))
- func (l *ClusterList) OldestN(count int) *ClusterList
- type ClusterState
Constants ¶
View Source
const ClusterPrefix = "Cluster"
Variables ¶
This section is empty.
Functions ¶
func GetClusterKey ¶
func GetClusterPoolKey ¶
Types ¶
type Cluster ¶
type Cluster struct {
ClusterID string `json:"ClusterID"`
PoolName string `json:"PoolName"`
State ClusterState `json:"State"`
URL string `json:"URL"`
AdminUser string `json:"AdminUser"`
AdminPassword string `json:"AdminPassword"`
CAFile []string `json:"CAFile"`
CertFile []string `json:"CertFile"`
KeyFile []string `json:"KeyFile"`
ExtraInfo string `json:"ExtraInfo"`
CreatedOn time.Time `json:"CreatedOn"`
ActivatedOn time.Time `json:"ActivatedOn"`
}
func ClusterByID ¶
ClusterByID gets a Items in a pool with specified ID
func NewCluster ¶
func NewEmptyCluster ¶
func NewEmptyCluster() *Cluster
type ClusterList ¶
type ClusterList struct {
// contains filtered or unexported fields
}
func List ¶
func List(ctx *generic.Context) (*ClusterList, error)
List gets all the Items in database
func NewClusterList ¶
func NewClusterList() *ClusterList
func WrapClusterList ¶
func WrapClusterList(clusters []*Cluster) *ClusterList
func (*ClusterList) ClusterInList ¶
func (l *ClusterList) ClusterInList(c *Cluster) bool
ClusterInList checks if specified cluster is in specified list
func (*ClusterList) ClustersInStateIn ¶
func (l *ClusterList) ClustersInStateIn(state ClusterState) *ClusterList
Extracts list of Items in a specific state
func (*ClusterList) ItemAt ¶
func (l *ClusterList) ItemAt(index int) *Cluster
ItemAt gets cluster of specified index
func (*ClusterList) List ¶
func (l *ClusterList) List(filter func(c *Cluster))
List iterates over all the clusters
func (*ClusterList) OldestN ¶
func (l *ClusterList) OldestN(count int) *ClusterList
Returns the oldest N Items
type ClusterState ¶
type ClusterState string
const ( ClusterProvisioning ClusterState = "Provisioning" ClusterFailed ClusterState = "Failed" ClusterSuccess ClusterState = "Success" ClusterUsed ClusterState = "Used" ClusterDeProvisioning ClusterState = "Deprovisioning" ClusterCleanup ClusterState = "Cleanup" ClusterReturned ClusterState = "Returned" )
func (ClusterState) String ¶
func (cs ClusterState) String() string
Click to show internal directories.
Click to hide internal directories.