https://github.com/teragrep/rlo_11
Java Record Routing Library
https://github.com/teragrep/rlo_11
Last synced: about 2 months ago
JSON representation
Java Record Routing Library
- Host: GitHub
- URL: https://github.com/teragrep/rlo_11
- Owner: teragrep
- License: agpl-3.0
- Created: 2024-04-17T10:14:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T10:38:44.000Z (about 2 years ago)
- Last Synced: 2024-04-17T19:13:17.065Z (about 2 years ago)
- Language: Java
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Java Record Routing Library
== Features
- Host+Tag based routing: CFE07Routing
- Host+Tag based index and sourcetype enrichment: CFE12Routing
- Authentication Token based Host+Tag information enrichment: CFE16Routing
- Account ID + LogGroup based Host+Tag information enrichment: KIN02Routing
== Examples
=== CFE07Routing
[source, java]
--
CFE07Routing cfe07Routing = new CFE07Routing("src/test/resources/cfe_07");
RoutingKey key = new RoutingKey("group-one-host-one", "group-one-tag-two");
for (String target : cfe07Routing.getTargets(key)) {
// spool target
if ("spool".equals(target)) {
// do spool stuff
}
}
--
=== CFE12Routing
[source, java]
--
CFE12Routing cfe12Routing = new CFE12Routing("src/test/resources/cfe_12");
RoutingKey key = new RoutingKey("example-host", "124f76f0-net");
for (String index : cfe12Routing.getIndexes(key)) {
for (String sourcetype : cfe12Routing.getSourcetypes(key)) {
// do stuff for each index and for each sourcetype
}
}
--
=== CFE16Routing
[source, java]
--
CFE16Routing cfe16Routing = new CFE16Routing("src/test/resources/cfe_16");
RoutingKey key = cfe16Routing.getRoutingKey("My RoutingKey having token");
String hostname = key.getHostname();
String appName = key.getAppName();
--
=== KIN02Routing
[source, java]
--
KIN02Routing kin02Routing = new KIN02Routing("src/test/resources/kin_02");
RoutingKey key = kin02Routing.getRoutingKey("1234567890","/example/logGroupName/ThatExists");
String hostname key.getHostname();
String appName = key.getAppName();
--