jobservice

package
v0.0.0-...-a14a4d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchedulerCtl ...
	SchedulerCtl = NewSchedulerCtrl()
)

Functions

This section is empty.

Types

type Execution

type Execution struct {
	ID            int64
	Status        string
	StatusMessage string
	Trigger       string
	ExtraAttrs    map[string]interface{}
	StartTime     time.Time
	EndTime       time.Time
}

Execution model for replication

type SchedulerController

type SchedulerController interface {
	// Get the schedule
	Get(ctx context.Context, vendorType string) (*scheduler.Schedule, error)
	// Create with cron type & string
	Create(ctx context.Context, vendorType, cronType, cron, callbackFuncName string, policy interface{}, extrasParam map[string]interface{}) (int64, error)
	// Delete the schedule
	Delete(ctx context.Context, vendorType string) error
	// List lists schedules
	List(ctx context.Context, query *q.Query) ([]*scheduler.Schedule, error)
	// Count counts schedules
	Count(ctx context.Context, query *q.Query) (int64, error)
	// Paused get the job scheduler is paused or not
	Paused(ctx context.Context) (bool, error)
}

SchedulerController interface to manage schedule

func NewSchedulerCtrl

func NewSchedulerCtrl() SchedulerController

NewSchedulerCtrl ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL