This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar Nginx | |
{ | |
rule TOP {^ .* '"' <host> <cmd> <path> <protocol> '"' <response> .* $} | |
token host { \S+ } | |
regex path { '/' <path-elem>? <path>?} | |
token path-elem { \S+ } | |
regex protocol { 'HTTP/1.1'} | |
token response { \d+ } | |
proto token cmd {*} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rakudo-star | |
RUN apt update && apt install -y \ | |
librdkafka++1 \ | |
libssl-dev | |
RUN zef update | |
RUN zef install PKafka HTTP::Client | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use lib 'lib/kafka'; | |
use Kafka; | |
sub MAIN () | |
{ | |
my $consumer = Kafka::Consumer.new( topic=>"test", brokers=>"192.168.0.5"); | |
$consumer.messages.tap(-> $msg |