Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentJob ¶
type ConcurrentJob interface {
Concurrent(s ...Step) *JobBuilder
}
ConcurrentJob is the interface that wraps the method of Concurrent.
Concurrent invokes multiple Step concurrently.
type JobBuilder ¶
type JobBuilder struct {
Flows []Flow
}
JobBuilder implements JobBuilderAPI.
func NewJobBuilder ¶
func NewJobBuilder() *JobBuilder
func (*JobBuilder) Build ¶
func (b *JobBuilder) Build() error
func (*JobBuilder) Concurrent ¶
func (b *JobBuilder) Concurrent(steps ...Step) *JobBuilder
func (*JobBuilder) Single ¶
func (b *JobBuilder) Single(s Step) *JobBuilder
type JobBuilderAPI ¶
type JobBuilderAPI interface {
// Build invokes multiple Step.
Build() error
SingleJob
ConcurrentJob
}
JobBuilderAPI is the builder interface for bootstrap and is designed to be invoked by JobExecutor.Run.
type JobExecutor ¶
type JobExecutor interface {
// Name returns the unique job name.
Name() string
// Run invokes bootstrap.
Run() error
}
JobExecutor is the top-level batch job.
A job has a unique name and a single bootstrap. It is designed so that the bootstrap is invoked by passing the unique name to the WolfX instance.
type ReaderSetter ¶
type ReaderSetter interface {
SetReader(r middleware.Reader) *StepBuilder
}
ReaderSetter sets Reader to StepBuilder.
type SingleJob ¶
type SingleJob interface {
Single(s Step) *JobBuilder
}
SingleJob is the interface that wraps the method of Single.
Single invokes a Step.
type StepBuilder ¶
type StepBuilder struct {
Reader middleware.Reader
Writer middleware.Writer
// contains filtered or unexported fields
}
StepBuilder implements StepBuilderAPI.
func NewStepBuilder ¶
func NewStepBuilder(ctx context.Context) *StepBuilder
func (*StepBuilder) Build ¶
func (b *StepBuilder) Build() error
func (*StepBuilder) SetReader ¶
func (b *StepBuilder) SetReader(r middleware.Reader) *StepBuilder
func (*StepBuilder) SetWriter ¶
func (b *StepBuilder) SetWriter(w middleware.Writer) *StepBuilder
type StepBuilderAPI ¶
type StepBuilderAPI interface {
// Build invokes user's settings.
Build() error
StepMiddlewareSetter
}
StepBuilderAPI is the builder interface for bootstrap and is designed to be invoked by each step definition.
type StepMiddlewareSetter ¶
type StepMiddlewareSetter interface {
ReaderSetter
WriterSetter
}
StepMiddlewareSetter is the interface that wraps methods of SetReader and SetWriter.
type WolfX ¶
type WolfX struct {
JobExecutors []JobExecutor
// If ArtOFF is true, ASCII art will not be displayed at launching.
ArtOFF bool
// LogLevel is gogger's LogLevel.
LogLevel gogger.LogLevel
}
WolfX is the top-level framework instance. It is the collection of batch jobs.
func (*WolfX) Add ¶
func (wx *WolfX) Add(e JobExecutor) *WolfX
Add adds JobExecutor to the WolfX instance.
type WriterSetter ¶
type WriterSetter interface {
SetWriter(r middleware.Writer) *StepBuilder
}
WriterSetter is sets Writer to StepBuilder.
