import "go.etcd.io/etcd/pkg/types"
Package types declares various data types and implements type-checking functions.
doc.go id.go set.go slice.go urls.go urlsmap.go
ID represents a generic identifier which is canonically stored as a uint64 but is typically represented as a base-16 string for input/output
IDFromString attempts to create an ID from a base-16 string.
IDSlice implements the sort interface
type Set interface { Add(string) Remove(string) Contains(string) bool Equals(Set) bool Length() int Values() []string Copy() Set Sub(Set) Set }
URLsMap is a map from a name to its URLs.
NewURLsMap returns a URLsMap instantiated from the given string, which consists of discovery-formatted names-to-URLs, like: mach0=http://1.1.1.1:2380,mach0=http://2.2.2.2::2380,mach1=http://3.3.3.3:2380,mach2=http://4.4.4.4:2380
NewURLsMapFromStringMap takes a map of strings and returns a URLsMap. The string values in the map can be multiple values separated by the sep string.
Len returns the size of URLsMap.
String turns URLsMap into discovery-formatted name-to-URLs sorted by name.
URLs returns a list of all URLs. The returned list is sorted in ascending lexicographical order.
Uint64Slice implements sort interface
func (p Uint64Slice) Len() int
func (p Uint64Slice) Less(i, j int) bool
func (p Uint64Slice) Swap(i, j int)
Package types imports 9 packages (graph) and is imported by 479 packages. Updated 2019-08-14. Refresh now. Tools for package owners.