Documentation ¶
Index ¶
- func IsClusterNotFoundError(err error) bool
- func NewCloudinfoNodePoolLabelSource(client *cloudinfo.Client) cluster.NodePoolLabelSource
- func NewEKSService(service eks.Service) cluster.Service
- func NewNodePoolStore(db *gorm.DB, clusters cluster.Store) cluster.NodePoolStore
- func NewPKEService(service pke.Service) cluster.Service
- type CadenceClusterManager
- type ClusterDeleterEntry
- type ClusterDeleterKey
- type Clusters
- func (c *Clusters) All() ([]*model.ClusterModel, error)
- func (c *Clusters) Exists(organizationID uint, name string) (bool, error)
- func (c *Clusters) FindByOrganization(organizationID uint) ([]*model.ClusterModel, error)
- func (c *Clusters) FindBySecret(organizationID uint, secretID string) ([]*model.ClusterModel, error)
- func (c *Clusters) FindNextWithGreaterID(clusterID uint) (uint, uint, error)
- func (c *Clusters) FindOneByID(organizationID uint, clusterID uint) (*model.ClusterModel, error)
- func (c *Clusters) FindOneByName(organizationID uint, clusterName string) (*model.ClusterModel, error)
- func (c *Clusters) GetConfigSecretIDByClusterID(organizationID uint, clusterID uint) (string, error)
- type PolyClusterDeleter
- type Store
- func (s Store) Exists(ctx context.Context, id uint) (bool, error)
- func (s Store) GetCluster(ctx context.Context, id uint) (cluster.Cluster, error)
- func (s Store) GetClusterByName(ctx context.Context, orgID uint, clusterName string) (cluster.Cluster, error)
- func (s Store) SetStatus(ctx context.Context, id uint, status string, message string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsClusterNotFoundError ¶
IsClusterNotFoundError returns true if the passed in error designates a cluster not found error
func NewCloudinfoNodePoolLabelSource ¶
func NewCloudinfoNodePoolLabelSource(client *cloudinfo.Client) cluster.NodePoolLabelSource
NewCloudinfoNodePoolLabelSource returns a new cluster.NodePoolLabelSource that gets default node pool labels from Cloudinfo.
func NewEKSService ¶
NewEKSService returns a new EKS distribution service.
func NewNodePoolStore ¶
NewNodePoolStore returns a new cluster.NodePoolStore that persists node pools into the database using Gorm.
Types ¶
type CadenceClusterManager ¶
type CadenceClusterManager struct {
// contains filtered or unexported fields
}
func NewCadenceClusterManager ¶
func NewCadenceClusterManager(workflowClient client.Client) CadenceClusterManager
func (CadenceClusterManager) DeleteCluster ¶
func (m CadenceClusterManager) DeleteCluster(ctx context.Context, clusterID uint, options cluster.DeleteClusterOptions) error
type ClusterDeleterEntry ¶
type ClusterDeleterEntry struct { Key ClusterDeleterKey Deleter cluster.Deleter }
ClusterDeleterEntry is a ClusterDeleterKey - Deleter pair.
type ClusterDeleterKey ¶
ClusterDeleterKey is used to select the cluster specific deleter implementation.
func MakeClusterDeleterKey ¶
func MakeClusterDeleterKey(provider, distribution string) ClusterDeleterKey
MakeClusterDeleterKey is a helper function that returns a ClusterDeleterKey.
func (ClusterDeleterKey) String ¶
func (k ClusterDeleterKey) String() string
String returns a string representation of the ClusterDeleterKey. This string can be used as a key in a map.
type Clusters ¶
type Clusters struct {
// contains filtered or unexported fields
}
Clusters acts as a repository interface for clusters.
func NewClusters ¶
NewClusters returns a new Clusters instance.
func (*Clusters) All ¶
func (c *Clusters) All() ([]*model.ClusterModel, error)
All returns all cluster instances for an organization.
func (*Clusters) FindByOrganization ¶
func (c *Clusters) FindByOrganization(organizationID uint) ([]*model.ClusterModel, error)
FindByOrganization returns all cluster instances for an organization.
func (*Clusters) FindBySecret ¶
func (c *Clusters) FindBySecret(organizationID uint, secretID string) ([]*model.ClusterModel, error)
FindBySecret returns all cluster instances for an organization filtered by secret.
func (*Clusters) FindNextWithGreaterID ¶
FindNextWithGreaterID returns the next cluster <orgID, clusterID> tuple that is greater than the passed in clusterID
func (*Clusters) FindOneByID ¶
FindOneByID returns a cluster instance for an organization by cluster ID.
func (*Clusters) FindOneByName ¶
func (c *Clusters) FindOneByName(organizationID uint, clusterName string) (*model.ClusterModel, error)
FindOneByName returns a cluster instance for an organization by cluster name.
type PolyClusterDeleter ¶
type PolyClusterDeleter struct {
// contains filtered or unexported fields
}
PolyClusterDeleter combines many cluster specific deleters into one.
func NewPolyClusterDeleter ¶
func NewPolyClusterDeleter(clusters cluster.Store, deleters ...ClusterDeleterEntry) PolyClusterDeleter
NewPolyClusterDeleter returns a new PolyClusterDeleter instance.
func (PolyClusterDeleter) DeleteCluster ¶
func (cd PolyClusterDeleter) DeleteCluster(ctx context.Context, clusterID uint, options cluster.DeleteClusterOptions) error
DeleteCluster selects the matching deleter for the cluster and delegates deletion to it.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a Cluster persistence implementation.
func (Store) GetCluster ¶
GetCluster returns a generic Cluster. Returns a NotFoundError when the cluster cannot be found.