Documentation ¶
Overview ¶
Package grpc provides a gRPC service to access the store for scheduler job definitions.
Index ¶
- Constants
- Variables
- func BuildDataSourceSyncJob(dsName string, flat, autoStart bool, languages ...string) *jobs.Job
- type JobsHandler
- func (j *JobsHandler) CleanDeadUserJobs(ctx context.Context) error
- func (j *JobsHandler) CleanStuckTasks(ctx context.Context, serverStart bool, logger log.ZapLogger, ...) ([]*proto.Task, error)
- func (j *JobsHandler) Close()
- func (j *JobsHandler) DeleteJob(ctx context.Context, request *proto.DeleteJobRequest) (*proto.DeleteJobResponse, error)
- func (j *JobsHandler) DeleteLogsFor(ctx context.Context, job string, tasks ...string) (int64, error)
- func (j *JobsHandler) DeleteTasks(ctx context.Context, request *proto.DeleteTasksRequest) (*proto.DeleteTasksResponse, error)
- func (j *JobsHandler) DetectStuckTasks(ctx context.Context, request *proto.DetectStuckTasksRequest) (*proto.DetectStuckTasksResponse, error)
- func (j *JobsHandler) GetJob(ctx context.Context, request *proto.GetJobRequest) (*proto.GetJobResponse, error)
- func (j *JobsHandler) ListAutoRestartJobs(ctx context.Context) (out []*proto.Job, er error)
- func (j *JobsHandler) ListJobs(request *proto.ListJobsRequest, streamer proto.JobService_ListJobsServer) error
- func (j *JobsHandler) ListTasks(request *proto.ListTasksRequest, streamer proto.JobService_ListTasksServer) error
- func (j *JobsHandler) Name() string
- func (j *JobsHandler) OrphanLogs(ctx context.Context) (int64, error)
- func (j *JobsHandler) PutJob(ctx context.Context, request *proto.PutJobRequest) (*proto.PutJobResponse, error)
- func (j *JobsHandler) PutTask(ctx context.Context, request *proto.PutTaskRequest) (*proto.PutTaskResponse, error)
- func (j *JobsHandler) PutTaskStream(streamer proto.JobService_PutTaskStreamServer) error
Constants ¶
View Source
const ServiceName = common.ServiceGrpcNamespace_ + common.ServiceJobs
Variables ¶
View Source
var ( Migration140 = false Migration150 = false Migration230 = false )
Functions ¶
Types ¶
type JobsHandler ¶
type JobsHandler struct { proto.UnimplementedJobServiceServer proto.UnimplementedTaskServiceServer logcore.Handler // contains filtered or unexported fields }
JobsHandler implements the JobService API
func NewJobsHandler ¶
func NewJobsHandler(runtime context.Context, store jobs.DAO, messageRepository log3.MessageRepository) *JobsHandler
NewJobsHandler creates a new JobsHandler
func (*JobsHandler) CleanDeadUserJobs ¶ added in v4.0.1
func (j *JobsHandler) CleanDeadUserJobs(ctx context.Context) error
CleanDeadUserJobs finds AutoStart+AutoClean user-scope jobs that were never started
func (*JobsHandler) CleanStuckTasks ¶
func (j *JobsHandler) CleanStuckTasks(ctx context.Context, serverStart bool, logger log.ZapLogger, duration ...time.Duration) ([]*proto.Task, error)
CleanStuckTasks may be run at startup to find orphan tasks and their corresponding logs, then find orphan logs as well
func (*JobsHandler) Close ¶
func (j *JobsHandler) Close()
func (*JobsHandler) DeleteJob ¶
func (j *JobsHandler) DeleteJob(ctx context.Context, request *proto.DeleteJobRequest) (*proto.DeleteJobResponse, error)
func (*JobsHandler) DeleteLogsFor ¶
func (*JobsHandler) DeleteTasks ¶
func (j *JobsHandler) DeleteTasks(ctx context.Context, request *proto.DeleteTasksRequest) (*proto.DeleteTasksResponse, error)
func (*JobsHandler) DetectStuckTasks ¶
func (j *JobsHandler) DetectStuckTasks(ctx context.Context, request *proto.DetectStuckTasksRequest) (*proto.DetectStuckTasksResponse, error)
DetectStuckTasks calls CleanStuckTasks with default duration
func (*JobsHandler) GetJob ¶
func (j *JobsHandler) GetJob(ctx context.Context, request *proto.GetJobRequest) (*proto.GetJobResponse, error)
func (*JobsHandler) ListAutoRestartJobs ¶ added in v4.2.0
ListAutoRestartJobs filters the list of restartable jobs
func (*JobsHandler) ListJobs ¶
func (j *JobsHandler) ListJobs(request *proto.ListJobsRequest, streamer proto.JobService_ListJobsServer) error
func (*JobsHandler) ListTasks ¶
func (j *JobsHandler) ListTasks(request *proto.ListTasksRequest, streamer proto.JobService_ListTasksServer) error
func (*JobsHandler) Name ¶
func (j *JobsHandler) Name() string
func (*JobsHandler) OrphanLogs ¶ added in v4.0.7
func (j *JobsHandler) OrphanLogs(ctx context.Context) (int64, error)
OrphanLogs finds all logs older than an hour that do not belong to any known tasks
func (*JobsHandler) PutJob ¶
func (j *JobsHandler) PutJob(ctx context.Context, request *proto.PutJobRequest) (*proto.PutJobResponse, error)
func (*JobsHandler) PutTask ¶
func (j *JobsHandler) PutTask(ctx context.Context, request *proto.PutTaskRequest) (*proto.PutTaskResponse, error)
func (*JobsHandler) PutTaskStream ¶
func (j *JobsHandler) PutTaskStream(streamer proto.JobService_PutTaskStreamServer) error
Click to show internal directories.
Click to hide internal directories.