VOL-2098 Support for Kafka liveness testing
* Adds liveness channel to sarama_client and kafka_interadapter proxy.
The liveness channel will push true or false to the channel on
each successful or failed Kafka publish.
* Adds support to make a "liveness publish attempt", which publishes
an empty message on a _liveness channel.
* Adds ServiceStatusNotReady to Probe
* Suppresses multiple Probe.UpdateStatus of the same status
* Adds the ability to attach a Probe to the grpc server, so that
when the probe returns NotReady, the Server responds to requests
with UNAVAILABLE.
Change-Id: I996c719570a50f2f6f397887d10d489608269c3f
diff --git a/pkg/kafka/kafka_inter_container_library.go b/pkg/kafka/kafka_inter_container_library.go
index c576bc6..3326191 100644
--- a/pkg/kafka/kafka_inter_container_library.go
+++ b/pkg/kafka/kafka_inter_container_library.go
@@ -764,6 +764,14 @@
return nil
}
+func (kp *InterContainerProxy) EnableLivenessChannel(enable bool) chan bool {
+ return kp.kafkaClient.EnableLivenessChannel(enable)
+}
+
+func (kp *InterContainerProxy) SendLiveness() error {
+ return kp.kafkaClient.SendLiveness()
+}
+
//formatRequest formats a request to send over kafka and returns an InterContainerMessage message on success
//or an error on failure
func encodeRequest(rpc string, toTopic *Topic, replyTopic *Topic, key string, kvArgs ...*KVArg) (*ic.InterContainerMessage, error) {