Documentation
¶
Index ¶
- func CleanupJobPlugins(runtimeType string)
- func CleanupQueuePlugin(runtimeType string)
- func ListJobPlugins(runtimeType string) map[schema.KindGroupVersion]JobPlugin
- func ListQueuePlugins(runtimeType string) map[schema.KindGroupVersion]QueuePlugin
- func RegisterJobPlugin(runtimeType string, frameworkVersion schema.KindGroupVersion, job JobPlugin)
- func RegisterQueuePlugin(runtimeType string, quotaType schema.KindGroupVersion, 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.KindGroupVersion]JobPlugin
func ListQueuePlugins ¶
func ListQueuePlugins(runtimeType string) map[schema.KindGroupVersion]QueuePlugin
func RegisterJobPlugin ¶
func RegisterJobPlugin(runtimeType string, frameworkVersion schema.KindGroupVersion, job JobPlugin)
func RegisterQueuePlugin ¶
func RegisterQueuePlugin(runtimeType string, quotaType schema.KindGroupVersion, queue QueuePlugin)
Types ¶
type JobGetter ¶
type JobGetter interface {
Job(fwVersion pfschema.KindGroupVersion) 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.KindGroupVersion) (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(kindVersion pfschema.KindGroupVersion) 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.KindGroupVersion) (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, kindVersion pfschema.KindGroupVersion) (interface{}, error)
Create(resource interface{}, kindVersion pfschema.KindGroupVersion) error
Delete(namespace string, name string, kindVersion pfschema.KindGroupVersion) error
Patch(namespace string, name string, kindVersion pfschema.KindGroupVersion, data []byte) error
Update(resource interface{}, kindVersion pfschema.KindGroupVersion) error
// RegisterListener register job/task/queue listener
RegisterListener(listenerType string, workQueue workqueue.RateLimitingInterface) error
StartListener(listenerType string, stopCh <-chan struct{}) error
}
Click to show internal directories.
Click to hide internal directories.