Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for simple-processor example #30

Merged
merged 3 commits into from
Mar 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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", Version: "v1.0.0"},
simonl2002 marked this conversation as resolved.
Show resolved Hide resolved
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")
// ...
}
```
```
Loading