Documentation ¶
Index ¶
- type BroadcastProcessor
- type InstanceStatus
- type KillProcessor
- type MapJobProcessor
- type MapReduceJobProcessor
- type Option
- type ProcessResult
- func (pr *ProcessResult) Result() string
- func (pr *ProcessResult) SetFailed()
- func (pr *ProcessResult) SetResult(result string)
- func (pr *ProcessResult) SetStatus(status InstanceStatus)
- func (pr *ProcessResult) SetSucceed()
- func (pr *ProcessResult) Status() InstanceStatus
- func (pr *ProcessResult) String() string
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastProcessor ¶ added in v0.0.2
type BroadcastProcessor interface { Processor PreProcess(ctx *jobcontext.JobContext) error PostProcess(ctx *jobcontext.JobContext) (*ProcessResult, error) }
type InstanceStatus ¶
type InstanceStatus int32
const ( InstanceStatusUnknown InstanceStatus = 0 InstanceStatusWaiting InstanceStatus = 1 InstanceStatusReady InstanceStatus = 2 InstanceStatusRunning InstanceStatus = 3 InstanceStatusSucceed InstanceStatus = 4 InstanceStatusFailed InstanceStatus = 5 InstanceStatusKilled InstanceStatus = 6 InstanceStatusPaused InstanceStatus = 7 InstanceStatusSubmitted InstanceStatus = 8 InstanceStatusRejected InstanceStatus = 9 InstanceStatusAccepted InstanceStatus = 10 InstanceStatusPartialFailed InstanceStatus = 11 InstanceStatusSkipped InstanceStatus = 12 InstanceStatusRemoved InstanceStatus = 99 )
func (InstanceStatus) Descriptor ¶
func (status InstanceStatus) Descriptor() string
func (InstanceStatus) EnDescriptor ¶
func (status InstanceStatus) EnDescriptor() string
func (InstanceStatus) IsFinished ¶
func (status InstanceStatus) IsFinished() bool
type KillProcessor ¶ added in v1.0.2
type KillProcessor interface {
Kill(ctx *jobcontext.JobContext) error
}
type MapJobProcessor ¶ added in v0.0.2
type MapJobProcessor interface { Processor Map(jobCtx *jobcontext.JobContext, taskList []interface{}, taskName string) (*ProcessResult, error) Kill(ctx *jobcontext.JobContext) error }
type MapReduceJobProcessor ¶ added in v0.0.2
type MapReduceJobProcessor interface { MapJobProcessor Reduce(jobCtx *jobcontext.JobContext) (*ProcessResult, error) RunReduceIfFail(jobCtx *jobcontext.JobContext) bool }
type Option ¶
type Option func(*ProcessResult)
func WithFailed ¶ added in v0.0.2
func WithFailed() Option
func WithResult ¶
func WithStatus ¶
func WithStatus(status InstanceStatus) Option
func WithSucceed ¶ added in v0.0.2
func WithSucceed() Option
type ProcessResult ¶
type ProcessResult struct {
// contains filtered or unexported fields
}
func NewProcessResult ¶
func NewProcessResult(opts ...Option) *ProcessResult
func (*ProcessResult) Result ¶
func (pr *ProcessResult) Result() string
func (*ProcessResult) SetFailed ¶ added in v0.0.2
func (pr *ProcessResult) SetFailed()
func (*ProcessResult) SetResult ¶
func (pr *ProcessResult) SetResult(result string)
func (*ProcessResult) SetStatus ¶
func (pr *ProcessResult) SetStatus(status InstanceStatus)
func (*ProcessResult) SetSucceed ¶ added in v0.0.2
func (pr *ProcessResult) SetSucceed()
func (*ProcessResult) Status ¶
func (pr *ProcessResult) Status() InstanceStatus
func (*ProcessResult) String ¶
func (pr *ProcessResult) String() string
type Processor ¶
type Processor interface {
Process(ctx *jobcontext.JobContext) (*ProcessResult, error)
}
Click to show internal directories.
Click to hide internal directories.