Documentation ¶
Index ¶
- func CleanupJobPlugins(runtimeType string)
- func CleanupQueuePlugin(runtimeType string)
- func ListJobPlugins(runtimeType string) map[schema.FrameworkVersion]JobPlugin
- func ListQueuePlugins(runtimeType string) map[schema.FrameworkVersion]QueuePlugin
- func RegisterJobPlugin(runtimeType string, frameworkVersion schema.FrameworkVersion, job JobPlugin)
- func RegisterQueuePlugin(runtimeType string, quotaType schema.FrameworkVersion, queue QueuePlugin)
- type JobGetter
- type JobInterface
- type JobPlugin
- type JobSample
- func (j *JobSample) AddEventListener(ctx context.Context, listenerType string, ...) error
- func (j *JobSample) Delete(ctx context.Context, job *api.PFJob) error
- func (j *JobSample) GetLog(ctx context.Context, jobLogRequest pfschema.JobLogRequest) (pfschema.JobLogInfo, error)
- func (j *JobSample) Stop(ctx context.Context, job *api.PFJob) error
- func (j *JobSample) Submit(ctx context.Context, job *api.PFJob) error
- func (j *JobSample) Update(ctx context.Context, job *api.PFJob) error
- type QueueGetter
- type QueueInterface
- type QueuePlugin
- type QueueSample
- func (qs *QueueSample) AddEventListener(ctx context.Context, listenerType string, ...) error
- func (qs *QueueSample) Create(ctx context.Context, q *api.QueueInfo) error
- func (qs *QueueSample) Delete(ctx context.Context, q *api.QueueInfo) error
- func (qs *QueueSample) Update(ctx context.Context, q *api.QueueInfo) error
- type RuntimeClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupJobPlugins ¶
func CleanupJobPlugins(runtimeType string)
func CleanupQueuePlugin ¶
func CleanupQueuePlugin(runtimeType string)
func ListJobPlugins ¶
func ListJobPlugins(runtimeType string) map[schema.FrameworkVersion]JobPlugin
func ListQueuePlugins ¶
func ListQueuePlugins(runtimeType string) map[schema.FrameworkVersion]QueuePlugin
func RegisterJobPlugin ¶
func RegisterJobPlugin(runtimeType string, frameworkVersion schema.FrameworkVersion, job JobPlugin)
func RegisterQueuePlugin ¶
func RegisterQueuePlugin(runtimeType string, quotaType schema.FrameworkVersion, queue QueuePlugin)
Types ¶
type JobGetter ¶
type JobGetter interface {
Job(fwVersion pfschema.FrameworkVersion) JobInterface
}
JobGetter return FrameworkJobInterface
type JobInterface ¶
type JobInterface interface { // Submit PaddleFlow Server operate on cluster Submit(ctx context.Context, job *api.PFJob) error Stop(ctx context.Context, job *api.PFJob) error Update(ctx context.Context, job *api.PFJob) error Delete(ctx context.Context, job *api.PFJob) error GetLog(ctx context.Context, jobLogRequest pfschema.JobLogRequest) (pfschema.JobLogInfo, error) // AddEventListener add jobListener, taskLister to notify PaddleFlow Server when job is updated AddEventListener(ctx context.Context, listenerType string, eventQueue workqueue.RateLimitingInterface, informer interface{}) error }
type JobPlugin ¶
type JobPlugin = func(RuntimeClientInterface) JobInterface
JobPlugin defines job interface
func GetJobPlugin ¶
func GetJobPlugin(runtimeType string, frameworkVersion schema.FrameworkVersion) (JobPlugin, bool)
type JobSample ¶
type JobSample struct { }
func (*JobSample) AddEventListener ¶
func (*JobSample) GetLog ¶
func (j *JobSample) GetLog(ctx context.Context, jobLogRequest pfschema.JobLogRequest) (pfschema.JobLogInfo, error)
type QueueGetter ¶
type QueueGetter interface {
Queue(quotaType pfschema.FrameworkVersion) QueueInterface
}
QueueGetter return RuntimeQueueInterface
type QueueInterface ¶
type QueueInterface interface { // PaddleFlow Server operate on Cluster Create(ctx context.Context, q *api.QueueInfo) error Delete(ctx context.Context, q *api.QueueInfo) error Update(ctx context.Context, q *api.QueueInfo) error // AddEventListener add queueListener to notify PaddleFlow Server when queue is updated AddEventListener(ctx context.Context, listenerType string, eventQueue workqueue.RateLimitingInterface, informer interface{}) error }
QueueInterface defines Queue operator methods
type QueuePlugin ¶
type QueuePlugin = func(RuntimeClientInterface) QueueInterface
QueuePlugin defines queue interface
func GetQueuePlugin ¶
func GetQueuePlugin(runtimeType string, quotaType schema.FrameworkVersion) (QueuePlugin, bool)
type QueueSample ¶
type QueueSample struct { }
func (*QueueSample) AddEventListener ¶
func (qs *QueueSample) AddEventListener(ctx context.Context, listenerType string, eventQueue workqueue.RateLimitingInterface, informer interface{}) error
type RuntimeClientInterface ¶
type RuntimeClientInterface interface { Cluster() string ClusterID() string ClusterName() string Get(namespace string, name string, fv pfschema.FrameworkVersion) (interface{}, error) Create(resource interface{}, fv pfschema.FrameworkVersion) error Delete(namespace string, name string, fv pfschema.FrameworkVersion) error Patch(namespace, name string, fv pfschema.FrameworkVersion, data []byte) error Update(resource interface{}, fv pfschema.FrameworkVersion) error // RegisterListener register job/task/queue listener RegisterListener(listenerType string, workQueue workqueue.RateLimitingInterface) error StartListener(listenerType string, stopCh <-chan struct{}) error // ListNodeQuota resource api for cluster nodes ListNodeQuota(ctx context.Context) (pfschema.QuotaSummary, []pfschema.NodeQuotaInfo, error) GetJobTypeFramework(fv pfschema.FrameworkVersion) (pfschema.JobType, pfschema.Framework) JobFrameworkVersion(jobType pfschema.JobType, fw pfschema.Framework) pfschema.FrameworkVersion }
Click to show internal directories.
Click to hide internal directories.