Documentation
¶
Index ¶
- Variables
- func CreateClusterComponent(tx *gorm.DB, c *ClusterComponent) error
- func DeleteClusterComponents(tx *gorm.DB, clusterID string) error
- type Cluster
- type ClusterComponent
- type ClusterSpec
- type S
- func (s *S) AutoMigrate() error
- func (s *S) CreateCluster(spec ClusterSpec) (*Cluster, error)
- func (s *S) DB() *gorm.DB
- func (s *S) DeleteCluster(clusterID, tenantID string) error
- func (s *S) FindClusterComponents(clusterID string) ([]ClusterComponent, error)
- func (s *S) GetCluster(clusterID, tenantID string) (*Cluster, error)
- func (s *S) GetClusterByNameAndTenantID(name, tenantID string) (*Cluster, error)
- func (s *S) ListClusters() ([]*Cluster, error)
- func (s *S) ListClustersByTenantID(tenantID string) ([]*Cluster, error)
- func (s *S) UpdateOrCreateClusterComponent(c *ClusterComponent) error
Constants ¶
This section is empty.
Variables ¶
var ClusterComponentNames = []string{
"inference-manager-engine",
"model-manager-loader",
"session-manager-agent",
"job-manager-dispatcher",
}
ClusterComponentNames is the names of cluster components.
Functions ¶
func CreateClusterComponent ¶ added in v1.3.0
func CreateClusterComponent(tx *gorm.DB, c *ClusterComponent) error
CreateClusterComponent creates a new cluster component in the store
Types ¶
type Cluster ¶
type Cluster struct { gorm.Model ClusterID string `gorm:"uniqueIndex"` TenantID string `gorm:"uniqueIndex:idx_cluster_tenant_id_name"` Name string `gorm:"uniqueIndex:idx_cluster_tenant_id_name"` RegistrationKey string }
Cluster represents a cluster.
type ClusterComponent ¶ added in v1.3.0
type ClusterComponent struct { gorm.Model ClusterID string `gorm:"uniqueIndex:idx_component_cluster_id_name"` Name string `gorm:"uniqueIndex:idx_component_cluster_id_name"` IsHealthy bool StatusMessage string }
ClusterComponent represents a component in a cluster.
func FindClusterComponent ¶ added in v1.3.0
func FindClusterComponent(tx *gorm.DB, clusterID, name string) (*ClusterComponent, error)
FindClusterComponent fetches the component for the given cluster and component name.
type ClusterSpec ¶
ClusterSpec is a spec of the cluster
type S ¶
type S struct {
// contains filtered or unexported fields
}
S represents the data store.
func (*S) AutoMigrate ¶
AutoMigrate sets up the auto-migration task of the database.
func (*S) CreateCluster ¶
func (s *S) CreateCluster(spec ClusterSpec) (*Cluster, error)
CreateCluster creates a cluster.
func (*S) DeleteCluster ¶
DeleteCluster deletes a cluster by cluster ID and tenant ID.
func (*S) FindClusterComponents ¶ added in v1.3.0
func (s *S) FindClusterComponents(clusterID string) ([]ClusterComponent, error)
FindClusterComponents fetches the components for the given cluster.
func (*S) GetCluster ¶
GetCluster returns a cluster by cluster ID and tenant ID.
func (*S) GetClusterByNameAndTenantID ¶
GetClusterByNameAndTenantID returns a cluster by name and tenant ID.
func (*S) ListClusters ¶
ListClusters lists clusters.
func (*S) ListClustersByTenantID ¶
ListClustersByTenantID lists clusters.
func (*S) UpdateOrCreateClusterComponent ¶ added in v1.3.0
func (s *S) UpdateOrCreateClusterComponent(c *ClusterComponent) error
UpdateOrCreateClusterComponent sets the appropriate cluster component fields in the database given a pointer to a component.