Documentation ¶
Index ¶
- Constants
- type ClientManager
- func (c *ClientManager) ClusterClient() client.ClusterClientInterface
- func (c *ClientManager) JobClient() client.JobClientInterface
- func (c *ClientManager) KubernetesClient() client.KubernetesClientInterface
- func (c *ClientManager) ServiceClient() client.ServiceClientInterface
- func (c *ClientManager) Time() util.TimeInterface
- type ClientManagerInterface
- type ResourceManager
- func (r *ResourceManager) CreateCluster(ctx context.Context, apiCluster *api.Cluster) (*rayv1api.RayCluster, error)
- func (r *ResourceManager) CreateComputeTemplate(ctx context.Context, runtime *api.ComputeTemplate) (*corev1.ConfigMap, error)
- func (r *ResourceManager) CreateJob(ctx context.Context, apiJob *api.RayJob) (*rayv1api.RayJob, error)
- func (r *ResourceManager) CreateService(ctx context.Context, apiService *api.RayService) (*rayv1api.RayService, error)
- func (r *ResourceManager) DeleteCluster(ctx context.Context, clusterName string, namespace string) error
- func (r *ResourceManager) DeleteComputeTemplate(ctx context.Context, name string, namespace string) error
- func (r *ResourceManager) DeleteJob(ctx context.Context, jobName string, namespace string) error
- func (r *ResourceManager) DeleteService(ctx context.Context, serviceName, namespace string) error
- func (r *ResourceManager) GetCluster(ctx context.Context, clusterName string, namespace string) (*rayv1api.RayCluster, error)
- func (r *ResourceManager) GetClusterEvents(ctx context.Context, clusterName string, namespace string) ([]corev1.Event, error)
- func (r *ResourceManager) GetComputeTemplate(ctx context.Context, name string, namespace string) (*corev1.ConfigMap, error)
- func (r *ResourceManager) GetJob(ctx context.Context, jobName string, namespace string) (*rayv1api.RayJob, error)
- func (r *ResourceManager) GetService(ctx context.Context, serviceName, namespace string) (*rayv1api.RayService, error)
- func (r *ResourceManager) GetServiceEvents(ctx context.Context, service rayv1api.RayService) ([]corev1.Event, error)
- func (r *ResourceManager) ListAllClusters(ctx context.Context) ([]*rayv1api.RayCluster, error)
- func (r *ResourceManager) ListAllComputeTemplates(ctx context.Context) ([]*corev1.ConfigMap, error)
- func (r *ResourceManager) ListAllJobs(ctx context.Context) ([]*rayv1api.RayJob, error)
- func (r *ResourceManager) ListAllServices(ctx context.Context) ([]*rayv1api.RayService, error)
- func (r *ResourceManager) ListClusters(ctx context.Context, namespace string) ([]*rayv1api.RayCluster, error)
- func (r *ResourceManager) ListComputeTemplates(ctx context.Context, namespace string) ([]*corev1.ConfigMap, error)
- func (r *ResourceManager) ListJobs(ctx context.Context, namespace string) ([]*rayv1api.RayJob, error)
- func (r *ResourceManager) ListServices(ctx context.Context, namespace string) ([]*rayv1api.RayService, error)
- func (r *ResourceManager) UpdateRayService(ctx context.Context, apiService *api.RayService) (*rayv1api.RayService, error)
- type ResourceManagerInterface
Constants ¶
View Source
const DefaultNamespace = "ray-system"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
Container for all service clients
func NewClientManager ¶
func NewClientManager() ClientManager
func (*ClientManager) ClusterClient ¶
func (c *ClientManager) ClusterClient() client.ClusterClientInterface
func (*ClientManager) JobClient ¶
func (c *ClientManager) JobClient() client.JobClientInterface
func (*ClientManager) KubernetesClient ¶
func (c *ClientManager) KubernetesClient() client.KubernetesClientInterface
func (*ClientManager) ServiceClient ¶
func (c *ClientManager) ServiceClient() client.ServiceClientInterface
func (*ClientManager) Time ¶
func (c *ClientManager) Time() util.TimeInterface
type ClientManagerInterface ¶
type ClientManagerInterface interface { ClusterClient() client.ClusterClientInterface JobClient() client.JobClientInterface ServiceClient() client.ServiceClientInterface KubernetesClient() client.KubernetesClientInterface Time() util.TimeInterface }
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
func NewResourceManager ¶
func NewResourceManager(clientManager ClientManagerInterface) *ResourceManager
It would be easier to discover methods.
func (*ResourceManager) CreateCluster ¶
func (r *ResourceManager) CreateCluster(ctx context.Context, apiCluster *api.Cluster) (*rayv1api.RayCluster, error)
clusters
func (*ResourceManager) CreateComputeTemplate ¶
func (r *ResourceManager) CreateComputeTemplate(ctx context.Context, runtime *api.ComputeTemplate) (*corev1.ConfigMap, error)
Compute Runtimes
func (*ResourceManager) CreateService ¶
func (r *ResourceManager) CreateService(ctx context.Context, apiService *api.RayService) (*rayv1api.RayService, error)
func (*ResourceManager) DeleteCluster ¶
func (*ResourceManager) DeleteComputeTemplate ¶
func (*ResourceManager) DeleteService ¶
func (r *ResourceManager) DeleteService(ctx context.Context, serviceName, namespace string) error
func (*ResourceManager) GetCluster ¶
func (r *ResourceManager) GetCluster(ctx context.Context, clusterName string, namespace string) (*rayv1api.RayCluster, error)
func (*ResourceManager) GetClusterEvents ¶
func (*ResourceManager) GetComputeTemplate ¶
func (*ResourceManager) GetService ¶
func (r *ResourceManager) GetService(ctx context.Context, serviceName, namespace string) (*rayv1api.RayService, error)
func (*ResourceManager) GetServiceEvents ¶
func (r *ResourceManager) GetServiceEvents(ctx context.Context, service rayv1api.RayService) ([]corev1.Event, error)
func (*ResourceManager) ListAllClusters ¶
func (r *ResourceManager) ListAllClusters(ctx context.Context) ([]*rayv1api.RayCluster, error)
func (*ResourceManager) ListAllComputeTemplates ¶
func (*ResourceManager) ListAllJobs ¶
func (*ResourceManager) ListAllServices ¶
func (r *ResourceManager) ListAllServices(ctx context.Context) ([]*rayv1api.RayService, error)
func (*ResourceManager) ListClusters ¶
func (r *ResourceManager) ListClusters(ctx context.Context, namespace string) ([]*rayv1api.RayCluster, error)
func (*ResourceManager) ListComputeTemplates ¶
func (*ResourceManager) ListServices ¶
func (r *ResourceManager) ListServices(ctx context.Context, namespace string) ([]*rayv1api.RayService, error)
func (*ResourceManager) UpdateRayService ¶
func (r *ResourceManager) UpdateRayService(ctx context.Context, apiService *api.RayService) (*rayv1api.RayService, error)
type ResourceManagerInterface ¶
type ResourceManagerInterface interface { CreateCluster(ctx context.Context, apiCluster *api.Cluster) (*rayv1api.RayCluster, error) GetCluster(ctx context.Context, clusterName string, namespace string) (*rayv1api.RayCluster, error) ListClusters(ctx context.Context, namespace string) ([]*rayv1api.RayCluster, error) ListAllClusters(ctx context.Context) ([]*rayv1api.RayCluster, error) DeleteCluster(ctx context.Context, clusterName string, namespace string) error CreateComputeTemplate(ctx context.Context, runtime *api.ComputeTemplate) (*corev1.ConfigMap, error) GetComputeTemplate(ctx context.Context, name string, namespace string) (*corev1.ConfigMap, error) ListComputeTemplates(ctx context.Context, namespace string) ([]*corev1.ConfigMap, error) DeleteComputeTemplate(ctx context.Context, name string, namespace string) error CreateJob(ctx context.Context, apiJob *api.RayJob) (*rayv1api.RayJob, error) GetJob(ctx context.Context, jobName string, namespace string) (*rayv1api.RayJob, error) ListJobs(ctx context.Context, namespace string) ([]*rayv1api.RayJob, error) ListAllJobs(ctx context.Context) ([]*rayv1api.RayJob, error) DeleteJob(ctx context.Context, jobName string, namespace string) error CreateService(ctx context.Context, apiService *api.RayService) (*rayv1api.RayService, error) UpdateRayService(ctx context.Context, request *api.UpdateRayServiceRequest) (*rayv1api.RayService, error) GetService(ctx context.Context, serviceName, namespace string) error ListServices(ctx context.Context, namespace string) ([]*rayv1api.RayService, error) ListAllServices(ctx context.Context) ([]*rayv1api.RayService, error) DeleteService(ctx context.Context, serviceName, namespace string) error GetClusterEvents(ctx context.Context, clusterName string, namespace string) ([]corev1.Event, error) GetServiceEvents(ctx context.Context, service rayv1api.RayService) ([]corev1.Event, error) }
ResourceManagerInterface can be used by services to operate resources kubernetes objects and potential db objects underneath operations should be encapsulated at this layer
Click to show internal directories.
Click to hide internal directories.