Skip to content

Commit

Permalink
docs: adjust interfaces for shceduler and worker
Browse files Browse the repository at this point in the history
  • Loading branch information
dadamu committed Mar 14, 2024
1 parent 2cd2f6c commit bc47afa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .docs/architecture/adr-001-general-parser-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The Worker interface defines the functionality for parsing blocks from the queue
```go
type Worker interface {
// Start starts the worker to parse blocks from the queue.
Start(ctx Context, queue BlockQueue)
Start(ctx Context, queue BlockQueue, extensions ...func(block Block) error)
}
```

Expand All @@ -156,6 +156,9 @@ type Scheduler interface {
// Register registers a periodic operations module.
Register(module PeriodicOperationsModule)

// RegisterTask register a periodic task to scheduler.
RegisterTask(task func(), duration time.Duration)

// Start starts the scheduler.
Start(ctx Context)
}
Expand Down

0 comments on commit bc47afa

Please sign in to comment.