Skip to content

Commit

Permalink
Fixes for simple-processor example (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonl2002 authored Mar 15, 2024
1 parent 674589c commit ce2a45d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func main() {
}
```

If the processor is very simple and can be reduced to a single function (e.g.
If the processor is very simple and can be reduced to a single function (e.g.
no configuration needed), then we can use `sdk.NewProcessorFunc()`, as below:

```go
Expand All @@ -112,13 +112,13 @@ import (
)

func main() {
sdk.Run(&sdk.NewProcessorFunc(
sdk.Specification{Name: "simple-processor"}),
sdk.Run(sdk.NewProcessorFunc(
sdk.Specification{Name: "simple-processor"},
func(ctx context.Context, rec opencdc.Record) (opencdc.Record, error) {
// do something with the record
return rec
return rec, nil
},
)
))
}
```

Expand Down Expand Up @@ -192,4 +192,4 @@ logger := sdk.Logger(ctx)
logger.Trace().Msg("Processing records")
// ...
}
```
```

0 comments on commit ce2a45d

Please sign in to comment.