tremor-kv

Crates.iotremor-kv
lib.rstremor-kv
version0.6.2
sourcesrc
created_at2020-02-22 16:38:22.549958
updated_at2023-10-26 11:32:38.724475
descriptionA logstash inspured key value extractor
homepage
repository
max_upload_size
id211523
size60,483
agares (Agares)

documentation

README

KV   Latest Version Build Status Quality Checks License Checks Security Checks Code Coverage

kv parser


KV parsing inspired by logstash's kv plugin.

Parses a string into a map. It is possible to split based on different characters that represent either field or key value boundaries.

A good part of the logstash functionality will be handled outside of this function and in a generic way in tremor script.

Use as a library

The kv parser was designed so that KV style parsing could be embedded into tremor's scripting language for extract operations.

The parser can also be used standalone

  let kv = Pattern::compile("%{key}%{%{val}").expect("Failed to build pattern");
  let r = kv.run("this%{is a%{test").expect("Failed to split input");
  assert_eq!(r.len(), 2);
  assert_eq!(r["this"], "is");
  assert_eq!(r["a"], "test");
Commit count: 0

cargo fmt