Repository navigation
Conversation
bwplotka
force-pushed
the
bwplotka/discovery
branch
from
November 10, 2026 10:17
3ee46a7 to
af11f91
Compare
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
bwplotka
force-pushed
the
bwplotka/discovery
branch
from
November 10, 2026 16:46
af11f91 to
fcb3c41
Compare
This was referenced Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the optional
discoveryCargo feature (serdeandserde_jsononly) withTargetGroup,StaticConfig,DiscoveryConfigs, and Prometheus duration parsing and formatting helpers (parse_durationandformat_duration). Part of prometheus/scrape.rs#36.Stack:
discovery: add TargetGroup, StaticConfig, and Prometheus duration helpers(this PR)discovery/dns: add DNS service discovery (dns_sd_configs)http_config: add Prometheus HTTPClientConfig and reqwest client builderdiscovery/kubernetes: add pod service discovery (role: pod)Commits in reading order:
discovery: add Prometheus duration parser and formatterdiscovery: add TargetGroup, StaticConfig, and DiscoveryConfigsIntentional differences from Go
StaticConfigandTargetGroupare distinct Rust structs rather than a slice type alias overtargetgroup.Groupas in discovery/discovery.go#L150 and discovery/targetgroup/targetgroup.go#L24-L65. Both serialize and deserialize identical JSON wire payloads, including always emitting"targets": []on empty groups.parse_durationandformat_durationreturn unsignedstd::time::Durationat millisecond precision instead of signedint64model.Durationin model/time.go#L227-L294, because discovery refresh intervals are non-negative.