package util
import "github.com/purpleidea/mgmt/etcd/util"
Index ¶
- func CmpURLsMap(m1, m2 etcdtypes.URLsMap) error
- func CopyURLs(urls etcdtypes.URLs) (etcdtypes.URLs, error)
- func CopyURLsMap(urlsMap etcdtypes.URLsMap) (etcdtypes.URLsMap, error)
- func FromStringListToURLs(surls []string) (etcdtypes.URLs, error)
- func FromURLsMapToStringList(m etcdtypes.URLsMap) []string
- func FromURLsToStringList(urls etcdtypes.URLs) []string
- func LocalhostURLs(urls etcdtypes.URLs) etcdtypes.URLs
Functions ¶
func CmpURLsMap ¶
CmpURLsMap compares two URLsMap's, and returns nil if they are the same.
func CopyURLs ¶
CopyURLs copies a URLs. TODO: submit this upstream to etcd ?
func CopyURLsMap ¶
CopyURLsMap copies a URLsMap. TODO: submit this upstream to etcd ?
func FromStringListToURLs ¶
FromStringListToURLs takes a list of string urls and converts them into the native type.
func FromURLsMapToStringList ¶
FromURLsMapToStringList flattens a map of URLs into a single string list. Remember to sort the result if you want it to be deterministic!
func FromURLsToStringList ¶
FromURLsToStringList turns a list of etcd URLs into a list of strings using the full URL scheme.
func LocalhostURLs ¶
LocalhostURLs returns the most localhost like URLs for direct connection. This gets clients to talk to the local servers first before looking remotely. TODO: improve this algorithm as it's currently a bad heuristic
Source Files ¶
- Version
- v0.0.0-20250322185616-c50a578426f1 (latest)
- Published
- Mar 22, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 days ago –
Tools for package owners.