Skip to content

Give GetListener a params struct instead of a raw string#867

Merged
brandur merged 1 commit intomasterfrom
brandur-get-listener-params
Apr 28, 2025
Merged

Give GetListener a params struct instead of a raw string#867
brandur merged 1 commit intomasterfrom
brandur-get-listener-params

Conversation

@brandur
Copy link
Contributor

@brandur brandur commented Apr 26, 2025

In #848 I went through and gave all driver functions a params struct
instead of whatever they had before. This tends to be more convenient
because it's uniform everywhere, and means that we need to change less
when a new specific parameter is added henceforth.

One I'd intended to do but forgot about was GetListener which
currently just takes a raw schema string. We haven't cut a release for
the change in #848, so it's a good time to change these driver
interfaces now, so here we give GetListener a params struct as well.

This is partly driven by me investigating [1], in which it might be
desirable to have a sub-schema leadership namespace so that different
River clients configured with different periodic jobs could run inside
the same River schema, which would necessitate a new listener parameter.
I'm not sure whether this project is a good idea or not yet, so I'll
need to investigate a little more.

[1] #742 (comment)

In #848 I went through and gave all driver functions a params struct
instead of whatever they had before. This tends to be more convenient
because it's uniform everywhere, and means that we need to change less
when a new specific parameter is added henceforth.

One I'd intended to do but forgot about was `GetListener` which
currently just takes a raw schema string. We haven't cut a release for
the change in #848, so it's a good time to change these driver
interfaces now, so here we give `GetListener` a params struct as well.

This is partly driven by me investigating [1], in which it might be
desirable to have a sub-schema leadership namespace so that different
River clients configured with different periodic jobs could run inside
the same River schema, which would necessitate a new listener parameter.
I'm not sure whether this project is a good idea or not yet, so I'll
need to investigate a little more.

[1] #742 (comment)
@brandur brandur requested a review from bgentry April 26, 2025 21:47
@brandur brandur merged commit fbcee7a into master Apr 28, 2025
19 of 20 checks passed
@brandur brandur deleted the brandur-get-listener-params branch April 28, 2025 05:40
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