Involved Source Files
Package tracestate implements support for the Tracestate header of the
W3C TraceContext propagation format.
Package-Level Type Names (total 2, both are exported)
/* sort exporteds by: | */
Entry represents one key-value pair in a list of key-value pair of Tracestate.
Key is an opaque string up to 256 characters printable. It MUST begin with a lowercase letter,
and can only contain lowercase letters a-z, digits 0-9, underscores _, dashes -, asterisks *, and
forward slashes /.
Value is an opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the
range 0x20 to 0x7E) except comma , and =.
func (*Tracestate).Entries() []Entry
func areEntriesValid(entries ...Entry) (*Entry, bool)
func (*Tracestate).remove(key string) *Entry
func New(parent *Tracestate, entries ...Entry) (*Tracestate, error)
func areEntriesValid(entries ...Entry) (*Entry, bool)
func containsDuplicateKey(entries ...Entry) (string, bool)
func isValid(entry Entry) bool
func (*Tracestate).add(entries []Entry) error
Tracestate represents tracing-system specific context in a list of key-value pairs. Tracestate allows different
vendors propagate additional information and inter-operate with their legacy Id formats.
entries[]Entry
Entries returns a slice of Entry.
(*T) add(entries []Entry) error(*T) remove(key string) *Entry
func New(parent *Tracestate, entries ...Entry) (*Tracestate, error)
func New(parent *Tracestate, entries ...Entry) (*Tracestate, error)
Package-Level Functions (total 4, in which 1 are exported)
New creates a Tracestate object from a parent and/or entries (key-value pair).
Entries from the parent are copied if present. The entries passed to this function
are inserted in front of those copied from the parent. If an entry copied from the
parent contains the same key as one of the entry in entries then the entry copied
from the parent is removed. See add func.
An error is returned with nil Tracestate if
1. one or more entry in entries is invalid.
2. two or more entries in the input entries have the same key.
3. the number of entries combined from the parent and the input entries exceeds maxKeyValuePairs.
(duplicate entry is counted only once).
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.