Documentation ¶
Index ¶
- Variables
- type CloudRun
- func (cr *CloudRun) CollectionStatus(projectID, collectionID int64, eps []*model.ExecutionPlan) (*smodel.CollectionStatus, error)
- func (cr *CloudRun) DeployEngine(projectID, collectionID, planID int64, engineID int, ...) error
- func (cr *CloudRun) DeployPlan(projectID, collectionID, planID int64, replicas int, ...) error
- func (cr *CloudRun) DownloadPodLog(collectionID, planID int64) (string, error)
- func (cr *CloudRun) ExposeProject(projectID int64) error
- func (cr *CloudRun) FetchEngineUrlsByPlan(collectionID, planID int64, opts *smodel.EngineOwnerRef) ([]string, error)
- func (cr *CloudRun) GetAllNodesInfo() (smodel.AllNodesInfo, error)
- func (cr *CloudRun) GetCollectionEnginesDetail(projectID, collectionID int64) (*smodel.CollectionDetails, error)
- func (cr *CloudRun) GetDeployedCollections() (map[int64]time.Time, error)
- func (cr *CloudRun) GetDeployedServices() (map[int64]time.Time, error)
- func (cr *CloudRun) GetEnginesByProject(projectID int64) ([]apiv1.Pod, error)
- func (cr *CloudRun) GetPodsMetrics(collectionID, planID int64) (map[string]apiv1.ResourceList, error)
- func (cr *CloudRun) MakeName(projectID, collectionID, planID int64, engineID int) string
- func (cr *CloudRun) PodReadyCount(collectionID int64) int
- func (cr *CloudRun) PurgeCollection(collectionID int64) error
- func (cr *CloudRun) PurgeProjectIngress(projectID int64) error
- type EngineScheduler
- type K8sClientManager
- func (kcm *K8sClientManager) CollectionStatus(projectID, collectionID int64, eps []*model.ExecutionPlan) (*smodel.CollectionStatus, error)
- func (kcm *K8sClientManager) CreateIngress(ingressClass, ingressName, serviceName string, collectionID, projectID int64) error
- func (kcm *K8sClientManager) CreateService(serviceName string, engine appsv1.Deployment) error
- func (kcm *K8sClientManager) DeployEngine(projectID, collectionID, planID int64, engineID int, ...) error
- func (kcm *K8sClientManager) DeployPlan(projectID, collectionID, planID int64, enginesNo int, ...) error
- func (kcm *K8sClientManager) DownloadPodLog(collectionID, planID int64) (string, error)
- func (kcm *K8sClientManager) ExposeProject(projectID int64) error
- func (kcm *K8sClientManager) FetchEngineUrlsByPlan(collectionID, planID int64, opts *smodel.EngineOwnerRef) ([]string, error)
- func (kcm *K8sClientManager) FetchLogFromPod(pod apiv1.Pod) (string, error)
- func (kcm *K8sClientManager) GetAllNodesInfo() (smodel.AllNodesInfo, error)
- func (kcm *K8sClientManager) GetCollectionEnginesDetail(projectID, collectionID int64) (*smodel.CollectionDetails, error)
- func (kcm *K8sClientManager) GetDeployedCollections() (map[int64]time.Time, error)
- func (kcm *K8sClientManager) GetDeployedServices() (map[int64]time.Time, error)
- func (kcm *K8sClientManager) GetEnginesByProject(projectID int64) ([]apiv1.Pod, error)
- func (kcm *K8sClientManager) GetIngressUrl(projectID int64) (string, error)
- func (kcm *K8sClientManager) GetNodesByCollection(collectionID string) ([]apiv1.Node, error)
- func (kcm *K8sClientManager) GetPods(labelSelector, fieldSelector string) ([]apiv1.Pod, error)
- func (kcm *K8sClientManager) GetPodsByCollection(collectionID int64, fieldSelector string) []apiv1.Pod
- func (kcm *K8sClientManager) GetPodsByCollectionPlan(collectionID, planID int64) ([]apiv1.Pod, error)
- func (kcm *K8sClientManager) GetPodsMetrics(collectionID, planID int64) (map[string]apiv1.ResourceList, error)
- func (kcm *K8sClientManager) PodReadyCount(collectionID int64) int
- func (kcm *K8sClientManager) PurgeCollection(collectionID int64) error
- func (kcm *K8sClientManager) PurgeProjectIngress(projectID int64) error
- func (kcm *K8sClientManager) ServiceReachable(engineUrl string) bool
- type NoResourcesFoundErr
Constants ¶
This section is empty.
Variables ¶
View Source
var (
IngressError = errors.New("Error with Ingress-")
)
Functions ¶
This section is empty.
Types ¶
type CloudRun ¶
type CloudRun struct {
// contains filtered or unexported fields
}
func NewCloudRun ¶
func NewCloudRun(cfg *config.ClusterConfig) *CloudRun
func (*CloudRun) CollectionStatus ¶
func (cr *CloudRun) CollectionStatus(projectID, collectionID int64, eps []*model.ExecutionPlan) (*smodel.CollectionStatus, error)
func (*CloudRun) DeployEngine ¶
func (*CloudRun) DeployPlan ¶
func (*CloudRun) DownloadPodLog ¶
func (*CloudRun) ExposeProject ¶
func (*CloudRun) FetchEngineUrlsByPlan ¶
func (cr *CloudRun) FetchEngineUrlsByPlan(collectionID, planID int64, opts *smodel.EngineOwnerRef) ([]string, error)
This func is used by generateEngines as we need to fetch the engine urls per plan
func (*CloudRun) GetAllNodesInfo ¶
func (cr *CloudRun) GetAllNodesInfo() (smodel.AllNodesInfo, error)
func (*CloudRun) GetCollectionEnginesDetail ¶
func (cr *CloudRun) GetCollectionEnginesDetail(projectID, collectionID int64) (*smodel.CollectionDetails, error)
func (*CloudRun) GetDeployedCollections ¶
func (*CloudRun) GetDeployedServices ¶
func (*CloudRun) GetEnginesByProject ¶
func (*CloudRun) GetPodsMetrics ¶
func (*CloudRun) PodReadyCount ¶
TODO: what we need is actually get the deployed engines account, not only ready ones. We also need to change this in k8s.go
func (*CloudRun) PurgeCollection ¶
func (*CloudRun) PurgeProjectIngress ¶
type EngineScheduler ¶
type EngineScheduler interface { DeployEngine(projectID, collectionID, planID int64, engineID int, containerConfig *config.ExecutorContainer) error DeployPlan(projectID, collectionID, planID int64, replicas int, containerConfig *config.ExecutorContainer) error CollectionStatus(projectID, collectionID int64, eps []*model.ExecutionPlan) (*smodel.CollectionStatus, error) FetchEngineUrlsByPlan(collectionID, planID int64, opts *smodel.EngineOwnerRef) ([]string, error) PurgeCollection(collectionID int64) error GetDeployedCollections() (map[int64]time.Time, error) GetAllNodesInfo() (smodel.AllNodesInfo, error) GetPodsMetrics(collectionID, planID int64) (map[string]apiv1.ResourceList, error) PodReadyCount(collectionID int64) int DownloadPodLog(collectionID, planID int64) (string, error) GetCollectionEnginesDetail(projectID, collectionID int64) (*smodel.CollectionDetails, error) GetDeployedServices() (map[int64]time.Time, error) ExposeProject(projectID int64) error PurgeProjectIngress(projectID int64) error GetEnginesByProject(projectID int64) ([]apiv1.Pod, error) }
func NewEngineScheduler ¶
func NewEngineScheduler(cfg *config.ClusterConfig) EngineScheduler
type K8sClientManager ¶
type K8sClientManager struct { *config.ExecutorConfig // contains filtered or unexported fields }
func NewK8sClientManager ¶
func NewK8sClientManager(cfg *config.ClusterConfig) *K8sClientManager
func (*K8sClientManager) CollectionStatus ¶
func (kcm *K8sClientManager) CollectionStatus(projectID, collectionID int64, eps []*model.ExecutionPlan) (*smodel.CollectionStatus, error)
func (*K8sClientManager) CreateIngress ¶
func (kcm *K8sClientManager) CreateIngress(ingressClass, ingressName, serviceName string, collectionID, projectID int64) error
func (*K8sClientManager) CreateService ¶
func (kcm *K8sClientManager) CreateService(serviceName string, engine appsv1.Deployment) error
func (*K8sClientManager) DeployEngine ¶
func (kcm *K8sClientManager) DeployEngine(projectID, collectionID, planID int64, engineID int, containerConfig *config.ExecutorContainer) error
func (*K8sClientManager) DeployPlan ¶
func (kcm *K8sClientManager) DeployPlan(projectID, collectionID, planID int64, enginesNo int, containerconfig *config.ExecutorContainer) error
func (*K8sClientManager) DownloadPodLog ¶
func (kcm *K8sClientManager) DownloadPodLog(collectionID, planID int64) (string, error)
func (*K8sClientManager) ExposeProject ¶
func (kcm *K8sClientManager) ExposeProject(projectID int64) error
func (*K8sClientManager) FetchEngineUrlsByPlan ¶
func (kcm *K8sClientManager) FetchEngineUrlsByPlan(collectionID, planID int64, opts *smodel.EngineOwnerRef) ([]string, error)
func (*K8sClientManager) FetchLogFromPod ¶
func (kcm *K8sClientManager) FetchLogFromPod(pod apiv1.Pod) (string, error)
func (*K8sClientManager) GetAllNodesInfo ¶
func (kcm *K8sClientManager) GetAllNodesInfo() (smodel.AllNodesInfo, error)
func (*K8sClientManager) GetCollectionEnginesDetail ¶
func (kcm *K8sClientManager) GetCollectionEnginesDetail(projectID, collectionID int64) (*smodel.CollectionDetails, error)
func (*K8sClientManager) GetDeployedCollections ¶
func (kcm *K8sClientManager) GetDeployedCollections() (map[int64]time.Time, error)
func (*K8sClientManager) GetDeployedServices ¶
func (kcm *K8sClientManager) GetDeployedServices() (map[int64]time.Time, error)
func (*K8sClientManager) GetEnginesByProject ¶
func (kcm *K8sClientManager) GetEnginesByProject(projectID int64) ([]apiv1.Pod, error)
func (*K8sClientManager) GetIngressUrl ¶
func (kcm *K8sClientManager) GetIngressUrl(projectID int64) (string, error)
func (*K8sClientManager) GetNodesByCollection ¶
func (kcm *K8sClientManager) GetNodesByCollection(collectionID string) ([]apiv1.Node, error)
func (*K8sClientManager) GetPods ¶
func (kcm *K8sClientManager) GetPods(labelSelector, fieldSelector string) ([]apiv1.Pod, error)
func (*K8sClientManager) GetPodsByCollection ¶
func (kcm *K8sClientManager) GetPodsByCollection(collectionID int64, fieldSelector string) []apiv1.Pod
func (*K8sClientManager) GetPodsByCollectionPlan ¶
func (kcm *K8sClientManager) GetPodsByCollectionPlan(collectionID, planID int64) ([]apiv1.Pod, error)
func (*K8sClientManager) GetPodsMetrics ¶
func (kcm *K8sClientManager) GetPodsMetrics(collectionID, planID int64) (map[string]apiv1.ResourceList, error)
func (*K8sClientManager) PodReadyCount ¶
func (kcm *K8sClientManager) PodReadyCount(collectionID int64) int
func (*K8sClientManager) PurgeCollection ¶
func (kcm *K8sClientManager) PurgeCollection(collectionID int64) error
func (*K8sClientManager) PurgeProjectIngress ¶
func (kcm *K8sClientManager) PurgeProjectIngress(projectID int64) error
func (*K8sClientManager) ServiceReachable ¶
func (kcm *K8sClientManager) ServiceReachable(engineUrl string) bool
type NoResourcesFoundErr ¶
func (*NoResourcesFoundErr) Error ¶
func (e *NoResourcesFoundErr) Error() string
Click to show internal directories.
Click to hide internal directories.