Documentation
¶
Index ¶
- Variables
- func UpdateRuntime(clusterInfo model.ClusterInfo) error
- type KubeRuntime
- func (kr *KubeRuntime) BuildConfig() (*rest.Config, error)
- func (kr *KubeRuntime) CloseQueue(q *model.Queue) error
- func (kr *KubeRuntime) CreateObject(obj *unstructured.Unstructured) error
- func (kr *KubeRuntime) CreatePV(namespace, fsID string) (string, error)
- func (kr *KubeRuntime) CreatePVC(namespace, fsId, pv string) error
- func (kr *KubeRuntime) CreateQueue(q *model.Queue) error
- func (kr *KubeRuntime) DeleteJob(jobInfo *api.PFJob) error
- func (kr *KubeRuntime) DeleteObject(namespace, name string, gvk k8sschema.GroupVersionKind) error
- func (kr *KubeRuntime) DeletePersistentVolume(name string, deleteOptions metav1.DeleteOptions) error
- func (kr *KubeRuntime) DeletePersistentVolumeClaim(namespace string, name string, deleteOptions metav1.DeleteOptions) error
- func (kr *KubeRuntime) DeletePod(namespace, name string) error
- func (kr *KubeRuntime) DeleteQueue(q *model.Queue) error
- func (kr *KubeRuntime) GCJob(stopCh <-chan struct{})
- func (kr *KubeRuntime) GetJobLog(jobLogRequest schema.JobLogRequest) (schema.JobLogInfo, error)
- func (kr *KubeRuntime) GetObject(namespace, name string, gvk k8sschema.GroupVersionKind) (interface{}, error)
- func (kr *KubeRuntime) GetQueueUsedQuota(q *model.Queue) (*resources.Resource, error)
- func (kr *KubeRuntime) Init() error
- func (kr *KubeRuntime) ListNamespaces(listOptions metav1.ListOptions) (*v1.NamespaceList, error)
- func (kr *KubeRuntime) ListNodeQuota() (schema.QuotaSummary, []schema.NodeQuotaInfo, error)
- func (kr *KubeRuntime) ListPods(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error)
- func (kr *KubeRuntime) Name() string
- func (kr *KubeRuntime) StopJob(jobInfo *api.PFJob) error
- func (kr *KubeRuntime) SubmitJob(jobInfo *api.PFJob) error
- func (kr *KubeRuntime) SyncJob(stopCh <-chan struct{})
- func (kr *KubeRuntime) SyncQueue(stopCh <-chan struct{})
- func (kr *KubeRuntime) UpdateJob(jobInfo *api.PFJob) error
- func (kr *KubeRuntime) UpdateObject(obj *unstructured.Unstructured) error
- func (kr *KubeRuntime) UpdateQueue(q *model.Queue) error
- type LocRuntime
- func (l *LocRuntime) CloseQueue(q *model.Queue) error
- func (l *LocRuntime) CreateQueue(q *model.Queue) error
- func (l *LocRuntime) DeleteJob(job *api.PFJob) error
- func (l *LocRuntime) DeleteQueue(q *model.Queue) error
- func (l *LocRuntime) GCJob(stopCh <-chan struct{})
- func (l *LocRuntime) GetJobLog(jobLogRequest schema.JobLogRequest) (schema.JobLogInfo, error)
- func (l *LocRuntime) Init() error
- func (l *LocRuntime) ListNodeQuota() (schema.QuotaSummary, []schema.NodeQuotaInfo, error)
- func (l *LocRuntime) Name() string
- func (l *LocRuntime) StopJob(job *api.PFJob) error
- func (l *LocRuntime) SubmitJob(job *api.PFJob) error
- func (l *LocRuntime) SyncJob(stopCh <-chan struct{})
- func (l *LocRuntime) SyncQueue(stopCh <-chan struct{})
- func (l *LocRuntime) UpdateJob(job *api.PFJob) error
- func (l *LocRuntime) UpdateQueue(q *model.Queue) error
- type RuntimeService
Constants ¶
This section is empty.
Variables ¶
View Source
var PFRuntimeMap sync.Map
Functions ¶
func UpdateRuntime ¶
func UpdateRuntime(clusterInfo model.ClusterInfo) error
Types ¶
type KubeRuntime ¶
type KubeRuntime struct {
// contains filtered or unexported fields
}
func (*KubeRuntime) BuildConfig ¶
func (kr *KubeRuntime) BuildConfig() (*rest.Config, error)
func (*KubeRuntime) CloseQueue ¶
func (kr *KubeRuntime) CloseQueue(q *model.Queue) error
func (*KubeRuntime) CreateObject ¶
func (kr *KubeRuntime) CreateObject(obj *unstructured.Unstructured) error
func (*KubeRuntime) CreatePV ¶
func (kr *KubeRuntime) CreatePV(namespace, fsID string) (string, error)
func (*KubeRuntime) CreatePVC ¶
func (kr *KubeRuntime) CreatePVC(namespace, fsId, pv string) error
func (*KubeRuntime) CreateQueue ¶
func (kr *KubeRuntime) CreateQueue(q *model.Queue) error
func (*KubeRuntime) DeleteObject ¶
func (kr *KubeRuntime) DeleteObject(namespace, name string, gvk k8sschema.GroupVersionKind) error
func (*KubeRuntime) DeletePersistentVolume ¶ added in v0.14.3
func (kr *KubeRuntime) DeletePersistentVolume(name string, deleteOptions metav1.DeleteOptions) error
func (*KubeRuntime) DeletePersistentVolumeClaim ¶ added in v0.14.3
func (kr *KubeRuntime) DeletePersistentVolumeClaim(namespace string, name string, deleteOptions metav1.DeleteOptions) error
func (*KubeRuntime) DeletePod ¶ added in v0.14.3
func (kr *KubeRuntime) DeletePod(namespace, name string) error
func (*KubeRuntime) DeleteQueue ¶
func (kr *KubeRuntime) DeleteQueue(q *model.Queue) error
func (*KubeRuntime) GCJob ¶
func (kr *KubeRuntime) GCJob(stopCh <-chan struct{})
func (*KubeRuntime) GetJobLog ¶
func (kr *KubeRuntime) GetJobLog(jobLogRequest schema.JobLogRequest) (schema.JobLogInfo, error)
func (*KubeRuntime) GetObject ¶
func (kr *KubeRuntime) GetObject(namespace, name string, gvk k8sschema.GroupVersionKind) (interface{}, error)
func (*KubeRuntime) GetQueueUsedQuota ¶ added in v0.14.3
func (*KubeRuntime) Init ¶
func (kr *KubeRuntime) Init() error
func (*KubeRuntime) ListNamespaces ¶ added in v0.14.3
func (kr *KubeRuntime) ListNamespaces(listOptions metav1.ListOptions) (*v1.NamespaceList, error)
func (*KubeRuntime) ListNodeQuota ¶
func (kr *KubeRuntime) ListNodeQuota() (schema.QuotaSummary, []schema.NodeQuotaInfo, error)
返回quota信息
func (*KubeRuntime) ListPods ¶ added in v0.14.3
func (kr *KubeRuntime) ListPods(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error)
func (*KubeRuntime) Name ¶
func (kr *KubeRuntime) Name() string
func (*KubeRuntime) SyncJob ¶
func (kr *KubeRuntime) SyncJob(stopCh <-chan struct{})
func (*KubeRuntime) SyncQueue ¶
func (kr *KubeRuntime) SyncQueue(stopCh <-chan struct{})
func (*KubeRuntime) UpdateObject ¶
func (kr *KubeRuntime) UpdateObject(obj *unstructured.Unstructured) error
func (*KubeRuntime) UpdateQueue ¶
func (kr *KubeRuntime) UpdateQueue(q *model.Queue) error
type LocRuntime ¶
func (*LocRuntime) CloseQueue ¶
func (l *LocRuntime) CloseQueue(q *model.Queue) error
func (*LocRuntime) CreateQueue ¶
func (l *LocRuntime) CreateQueue(q *model.Queue) error
func (*LocRuntime) DeleteQueue ¶
func (l *LocRuntime) DeleteQueue(q *model.Queue) error
func (*LocRuntime) GCJob ¶
func (l *LocRuntime) GCJob(stopCh <-chan struct{})
func (*LocRuntime) GetJobLog ¶
func (l *LocRuntime) GetJobLog(jobLogRequest schema.JobLogRequest) (schema.JobLogInfo, error)
func (*LocRuntime) Init ¶
func (l *LocRuntime) Init() error
func (*LocRuntime) ListNodeQuota ¶
func (l *LocRuntime) ListNodeQuota() (schema.QuotaSummary, []schema.NodeQuotaInfo, error)
func (*LocRuntime) Name ¶
func (l *LocRuntime) Name() string
func (*LocRuntime) SyncJob ¶
func (l *LocRuntime) SyncJob(stopCh <-chan struct{})
func (*LocRuntime) SyncQueue ¶
func (l *LocRuntime) SyncQueue(stopCh <-chan struct{})
func (*LocRuntime) UpdateQueue ¶
func (l *LocRuntime) UpdateQueue(q *model.Queue) error
type RuntimeService ¶
type RuntimeService interface {
Name() string
// Init create client for runtime
Init() error
// SubmitJob submit job to cluster
SubmitJob(job *api.PFJob) error
// StopJob stop job on cluster
StopJob(job *api.PFJob) error
// UpdateJob update job on cluster
UpdateJob(job *api.PFJob) error
// DeleteJob delete job from cluster
DeleteJob(job *api.PFJob) error
// SyncJob sync job status from cluster
SyncJob(stopCh <-chan struct{})
// GCJob garbage collect
GCJob(stopCh <-chan struct{})
GetJobLog(jobLogRequest schema.JobLogRequest) (schema.JobLogInfo, error)
// SyncQueue sync queue information from cluster
SyncQueue(stopCh <-chan struct{})
// CreateQueue create a queue on cluster
CreateQueue(q *model.Queue) error
// DeleteQueue delete a queue on cluster
DeleteQueue(q *model.Queue) error
// CloseQueue close a queue on cluster
CloseQueue(q *model.Queue) error
// UpdateQueue update a queue on cluster
UpdateQueue(q *model.Queue) error
ListNodeQuota() (schema.QuotaSummary, []schema.NodeQuotaInfo, error)
}
func CreateRuntime ¶
func CreateRuntime(clusterInfo model.ClusterInfo) (RuntimeService, error)
CreateRuntime create RuntimeService and stored in Cache
func GetOrCreateRuntime ¶
func GetOrCreateRuntime(clusterInfo model.ClusterInfo) (RuntimeService, error)
func NewKubeRuntime ¶
func NewKubeRuntime(cluster schema.Cluster) RuntimeService
func NewLocalRuntime ¶
func NewLocalRuntime(cluster schema.Cluster) RuntimeService
Click to show internal directories.
Click to hide internal directories.