Documentation
¶
Overview ¶
Package backendruntime provides a shared, thread-safe named-lookup registry for provider runtime configs (API credentials, exec mode).
truenasprovider, proxmoxprovider, and dockerprovider each hold connection details for their backends.<kind>[] config entries, keyed by name, so exec-time code (SSH dial, tunnels, VNC, KV bridge) can resolve a hosts.Record's tagged backend name back to live credentials. Before this package existed, all three providers hand-rolled an identical mutex+slice+linear-scan registry; Registry concentrates that one implementation instead of leaving it duplicated three times.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry[T any] struct { // contains filtered or unexported fields }
Registry is a thread-safe, name-indexed store for a provider's runtime configs, rebuilt wholesale on every config reload via Reconfigure.
func (*Registry[T]) ByName ¶
ByName returns the entry matching name (empty name matches the first entry).
func (*Registry[T]) Reconfigure ¶
func (r *Registry[T]) Reconfigure(items []T)
Reconfigure atomically replaces the registry's contents.