Documentation
¶
Overview ¶
Package stringmap provides a read-only, deterministically-ordered view over a set of string key/value pairs. It is the type the SDK hands back to users for things like incoming request headers and TerminalError metadata, where exposing a plain map would leak Go's intentionally-randomized map iteration order.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map interface {
// Get returns the value associated with key, or "" if there is none.
Get(key string) string
// Iter iterates the pairs in a deterministic, key-sorted order.
Iter() iter.Seq2[string, string]
// ToMap returns the pairs as a new plain map, for interop with external code.
// The returned map is a copy: mutating it does not affect the Map.
ToMap() map[string]string
json.Marshaler
}
Map is a read-only view over string key/value pairs with deterministic (key-sorted) iteration order.
Click to show internal directories.
Click to hide internal directories.