Skip to content

Make file informer resync period configurable#89

Merged
ecordell merged 2 commits into
authzed:mainfrom
ivanauth:fix/issue-9-fileinformer-resync-options
Jul 17, 2026
Merged

Make file informer resync period configurable#89
ecordell merged 2 commits into
authzed:mainfrom
ivanauth:fix/issue-9-fileinformer-resync-options

Conversation

@ivanauth

@ivanauth ivanauth commented May 15, 2026

Copy link
Copy Markdown
Contributor

Adds a functional-options API to NewFileInformerFactory so callers can override the default 1-minute resync period.

Existing call sites are unaffected.

Closes #9

ivanauth added 2 commits May 15, 2026 12:52
Add a functional-options API to NewFileInformerFactory so callers can
override the default 1-minute resync period. A zero value disables
synthetic resync events, matching the convention used by client-go
informers; negative values fall back to the default.

The resync loop now uses a time.Ticker (skipped entirely when resyncs
are disabled) instead of a per-iteration context-with-timeout.
golangci-lint v2.12.2's govet flags slices calls from golang.org/x/exp/slices
as un-inlineable because type-parameter inference for inlining isn't
supported. Switching to the stdlib slices package (available since Go 1.21)
resolves the warnings.

@ecordell ecordell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

thanks for fixing this long-standing issue!

@ecordell
ecordell merged commit 54b98f7 into authzed:main Jul 17, 2026
6 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable resync period for FileInformer

2 participants