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

[Pre-1.0] Change Send to not accept variadic list of msgs #58

Open
abraithwaite opened this issue Jan 31, 2025 · 0 comments
Open

[Pre-1.0] Change Send to not accept variadic list of msgs #58

abraithwaite opened this issue Jan 31, 2025 · 0 comments

Comments

@abraithwaite
Copy link
Member

Send currently looks like this:

kawa/types.go

Line 113 in cac41ab

Send(context.Context, func(), ...Message[T]) error

After extensive use internally, I feel strongly that we should change that to remove the variadic nature of msgs.

	Send(context.Context, func(), Message[T]) error

We simply haven't made use of the multi-message send enough, and the ability to omit messages entirely calling send is awkward and leads to weird questions around implementation like "do I have to handle the empty messages case?"

The new API will support evolution through adding functional variadic options without breaking builds later on, if they become necessary.

Most importantly, it would make implementing destinations far far simpler.

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

No branches or pull requests

1 participant