Documentation
¶
Index ¶
- type Definition
- func (d Definition) CanonicalValue(canonical string, value any) (any, error)
- func (d Definition) Normalize(row map[string]any) (span.Span, error)
- func (d Definition) SourceField(canonical string) (string, error)
- func (d Definition) SourceTarget(canonical string) (Target, error)
- func (d Definition) Translate(body []byte, direction Direction) ([]byte, error)
- func (d Definition) TranslateSearch(search esdsl.Search, direction Direction) (esdsl.Search, error)
- type Direction
- type Discovery
- type Field
- type NestedAttributes
- type NestedLeaf
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
type Definition struct {
Fields map[string]Field `json:"fields"`
// Nested resolves canonical attributes no scalar field maps, from a key/value
// list such as Jaeger's nested `tags`, whose entries are never flattened.
Nested []NestedAttributes `json:"nested,omitempty"`
}
func Discover ¶
func Discover(options Discovery) (Definition, error)
Discover resolves a layout from the selected index's mapped fields, never its name.
func (Definition) CanonicalValue ¶
func (d Definition) CanonicalValue(canonical string, value any) (any, error)
func (Definition) SourceField ¶
func (d Definition) SourceField(canonical string) (string, error)
SourceField is the scalar source field of canonical. An attribute only a nested list holds has none; read it through SourceTarget.
func (Definition) SourceTarget ¶
func (d Definition) SourceTarget(canonical string) (Target, error)
SourceTarget is where canonical is read: its scalar field when the index maps one, else the value of the nested list entry keyed by the attribute name.
func (Definition) Translate ¶
func (d Definition) Translate(body []byte, direction Direction) ([]byte, error)
func (Definition) TranslateSearch ¶
type Discovery ¶
type Discovery struct {
Fields map[string]string
// Nested holds the leaves of nested containers, keyed by full field name.
Nested map[string]NestedLeaf
Overrides map[string]Field
NestedOverrides []NestedAttributes
}
type NestedAttributes ¶
type NestedAttributes struct {
Prefix string `json:"prefix"`
Path string `json:"path"`
Key string `json:"key"`
Value string `json:"value"`
}
NestedAttributes maps every canonical name under Prefix to the Value of the entry of the nested list at Path whose Key equals the rest of the name.
type NestedLeaf ¶
NestedLeaf is a field mapped inside a nested container.
Click to show internal directories.
Click to hide internal directories.