Summary
Update the flagd provider to use time.Duration types for options that represent durations. Also, update variable names to remove the ms postfix, as duration values will no longer be strictly milliseconds.
This change should not affect any existing environment variable formats; those should remain as they are to maintain consistency across providers and accommodate languages that do not support a similar duration representation.
Options to change
-retryGracePeriod
-retryBackoffMs
-retryBackoffMaxMs
see also https://flagd.dev/reference/specifications/providers/#configuration-options
Reasoning
- Using
time.Duration is idiomatic in Go and improves type safety/expressiveness for time-based fields.
- Removing the
ms postfix from variable names clears up ambiguity, since durations can be provided in any valid Go duration format.
- Env variables must remain as-is to ensure all providers use the same interface; some languages lack an equivalent type for durations.
Additional Context
This came up during PR review of #806 by @sahidvelji
Summary
Update the flagd provider to use
time.Durationtypes for options that represent durations. Also, update variable names to remove themspostfix, as duration values will no longer be strictly milliseconds.This change should not affect any existing environment variable formats; those should remain as they are to maintain consistency across providers and accommodate languages that do not support a similar duration representation.
Options to change
-retryGracePeriod
-retryBackoffMs
-retryBackoffMaxMs
see also https://flagd.dev/reference/specifications/providers/#configuration-options
Reasoning
time.Durationis idiomatic in Go and improves type safety/expressiveness for time-based fields.mspostfix from variable names clears up ambiguity, since durations can be provided in any valid Go duration format.Additional Context
This came up during PR review of #806 by @sahidvelji