fix: Use export config for ItemSubmitter Options so it is mockable #22

Merged
k-simons merged 2 commits from ksimons/andConfig into develop 2026-01-29 21:34:25 +00:00
k-simons commented 2026-01-29 21:31:33 +00:00 (Migrated from github.com)

Refactors the ItemSubmitter configuration to match the pattern used in
workerpool/options.go, introducing an exported ItemSubmitterConfig struct with private
fields and simplifying the option function type.

  • Added ItemSubmitterConfig struct with private maxNumRequeues and logError fields
  • Changed ItemSubmitterOption from generic interface to function type alias
  • Removed itemSubmitterOptionFunc adapter type and apply method
  • Updated NewDefaultItemSubmitter to build config first, then pass to struct
  • Updated WithMaxNumRequeues and WithErrorLogger to be non-generic
  • Updated tests to use new non-generic option syntax
Refactors the ItemSubmitter configuration to match the pattern used in workerpool/options.go, introducing an exported ItemSubmitterConfig struct with private fields and simplifying the option function type. - Added ItemSubmitterConfig struct with private maxNumRequeues and logError fields - Changed ItemSubmitterOption from generic interface to function type alias - Removed itemSubmitterOptionFunc adapter type and apply method - Updated NewDefaultItemSubmitter to build config first, then pass to struct - Updated WithMaxNumRequeues and WithErrorLogger to be non-generic - Updated tests to use new non-generic option syntax
changelog-app[bot] commented 2026-01-29 21:31:37 +00:00 (Migrated from github.com)

✅ Successfully generated changelog entry!

Entry generated via PR title

To modify this entry, edit PR title using proper format.


📋Changelog Preview

🐛 Fixes

  • Use export config for ItemSubmitter Options so it is mockable (#22)
### ✅ **Successfully generated changelog entry!** #### Entry generated via PR title To modify this entry, edit PR title using proper format. --- ### 📋Changelog Preview ### 🐛 Fixes * Use export config for ItemSubmitter Options so it is mockable ([#22](https://github.com/palantir/witchcraft-go-tasks/pull/22)) <!-- changelog-success-comment -->
tabboud (Migrated from github.com) approved these changes 2026-01-29 21:34:19 +00:00
tabboud (Migrated from github.com) left a comment

👍

👍
autorelease3[bot] commented 2026-01-29 21:34:32 +00:00 (Migrated from github.com)

Released v0.10.0

Released [v0.10.0](https://github.com/palantir/witchcraft-go-tasks/releases/tag/v0.10.0)
Sign in to join this conversation.
No description provided.