hbouvier / function-simple-kafka-consumer

A simple kafka consumer in go implemented as an OpenFaaS function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple kafka function

To use libraries in the function

go get -u github.com/golang/dep/cmd/dep
cd ~/gopath/src/github.com/hbouvier/function-simple-kafka-consume
cd kafka-message
dep init .
# dep ensure -add github.com/google/uuid
# dep ensure -add github.com/segmentio/kafka-go
cd ..
faas-cli build

To create the sealed secrets

~/bin/kubeseal --fetch-cert --controller-name ofc-sealedsecrets-sealed-secrets  > pub-cert.pem
faas-cli cloud seal --name hbouvier-function-simple-kafka-consumer --literal kafka-response-topic=response --literal kafka-url=kafka.openfaas:9092

About

A simple kafka consumer in go implemented as an OpenFaaS function


Languages

Language:Go 100.0%