Skip to content

Java Record Routing Library

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
license-header
Notifications You must be signed in to change notification settings

teragrep/rlo_11

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

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

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

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();