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

Added Option.Marshal to support Avro serialization #2

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

nicfit
Copy link
Contributor

@nicfit nicfit commented Sep 13, 2024

For example:

var opts = slogkafka.Option{
    Level:       level,
    KafkaWriter: &writer,
    Marshal: func(v any) ([]byte, error) {
        return avro.Marshal(schema, v)
    },
}

@samber
Copy link
Owner

samber commented Sep 17, 2024

i'm just going to rename Marshal to Marshaler, to match the naming of other slog handlers of my collection

thanks for the contrib!

@samber samber merged commit 78c9cf5 into samber:main Sep 17, 2024
5 checks passed
@samber
Copy link
Owner

samber commented Sep 17, 2024

-> v2.6.0

@nicfit nicfit deleted the avro branch September 23, 2024 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants