dynamic-config-store-core 0.6.1

Internal machinery shared by the dynamic-config store crates. No stable API.
Documentation

Machinery the dynamic-config store crates share.

This crate has no stable API. It is published only because the seven store crates are published and cargo will not let a published crate depend on one that is not. Depend on dynamic-config-consul, -etcd, -firestore, -nats, -redis, -s3 or -vault; nothing here is meant to be named directly, and anything here may change in a patch release.

What lives here is what was identical in more than one store crate and carried a decision worth making once:

  • [attempts] — where a watch loop reports an attempt that came back with nothing, so a store that has stopped answering stops looking healthy. Seven loops, one line each.
  • [credential] — when to obtain, reuse and refresh a token that expires. Consul, Vault and Firestore each kept a copy; the differences between them stayed in the stores, and that module's documentation says which and why.
  • [documents] — folding several keys into the one document fetch returns: the ordering rule, the collision report, and the limits an untrusted key list is held to. Three stores read several keys and all three would otherwise have written the same merge.
  • [guarded] — running a watch callback with a panic net. Seven copies, byte for byte.
  • [redacted] and [redacted_list] — removing a credential from a store URL before it reaches an error message. Two copies, differing in one documented way that is now a parameter rather than a fork.
  • [tls] — a custom certificate authority and a client certificate, as data rather than as whichever type the store's client happens to use. Not a deduplication of seven copies: there were none, and four stores had no way to say it at all.

What is deliberately not here: each store's retry policy, its timeout default, and the vocabulary it sorts its own failures with. Those look alike from a distance and are different decisions up close — a Vault 403 and a Firestore 401 mean the same thing to a person and nothing to a match.