feat: add executor (#3)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Adds an executor which can process and dispatch events to a set of workers. Co-authored-by: kjuulh <contact@kjuulh.io> Co-committed-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
22
internal/executor/executor.go
Normal file
22
internal/executor/executor.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package executor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
type Executor struct {
|
||||
logger *slog.Logger
|
||||
}
|
||||
|
||||
func NewExecutor(logger *slog.Logger) *Executor {
|
||||
return &Executor{
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Executor) DispatchEvents(ctx context.Context) error {
|
||||
e.logger.InfoContext(ctx, "dispatching events")
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user