openfaas / connector-sdk

SDK for connecting events to functions
MIT License
54 stars 25 forks source link

Add functions to get the current list of topics #14

Closed tessellator closed 5 years ago

tessellator commented 5 years ago

Resolves #13

This commit adds a Topics function to bring the TopicMap implementation in line with that of the Kafka connector. The Topics function was added to kafka-connector after the connector-sdk was extracted from it.

It also adds a Topics function to Controller that returns the list of topics in the TopicMap. This function is added so that connector implementations can get the list of current topics without having to knew about the internal structure of Controller.

Signed-off-by: Chad Taylor taylor.thomas.c@gmail.com

alexellis commented 5 years ago

I'll merge the current set of changes and let's convert to RWMutex in the next PR?