Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kouzant committed Feb 15, 2020
1 parent a03ad8d commit 4c3e74d
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ action.

Your `Task` implementation should comply with the following interface:

type Task interface {
Pre() error
PerformAction() ([]Task, error)
Post() error
Name() string
}
```go
type Task interface {
Pre() error
PerformAction() ([]Task, error)
Post() error
Name() string
}
```

### Plan

Expand All @@ -41,9 +43,11 @@ empy slice of `Tasks` meaning the final state has been reached.

A `Plan` should implement the follwing interface:

type Plan interface {
Create() ([]Task, error)
}
```go
type Plan interface {
Create() ([]Task, error)
}
```

### Executor

Expand All @@ -54,12 +58,14 @@ execute a plan. The latter will timeout after a configurable period of time.
Call `executor.New(options *execloop.Options) *Executor` to create a new
scheduler. The `Options` are the following:

type Options struct {
Logger Logger
SleepBetweenRuns time.Duration
ErrorsToTolerate int
ExecutionTimeout time.Duration
}
```go
type Options struct {
Logger Logger
SleepBetweenRuns time.Duration
ErrorsToTolerate int
ExecutionTimeout time.Duration
}
```

Use the `With*` functions to override the default options obtained by `execloop.DefaultOptions()`

Expand Down

0 comments on commit 4c3e74d

Please sign in to comment.