[VOL-2736]host and port should be specified as a single argument not as two separate arguments
Change-Id: I312fe753ac0fe62c942f335371e6449809ecfb85
diff --git a/pkg/kafka/kafka_inter_container_library.go b/pkg/kafka/kafka_inter_container_library.go
index beda537..9f9fbfc 100644
--- a/pkg/kafka/kafka_inter_container_library.go
+++ b/pkg/kafka/kafka_inter_container_library.go
@@ -79,8 +79,7 @@
// interContainerProxy represents the messaging proxy
type interContainerProxy struct {
- kafkaHost string
- kafkaPort int
+ kafkaAddress string
defaultTopic *Topic
defaultRequestHandlerInterface interface{}
deviceDiscoveryTopic *Topic
@@ -107,15 +106,9 @@
type InterContainerProxyOption func(*interContainerProxy)
-func InterContainerHost(host string) InterContainerProxyOption {
+func InterContainerAddress(address string) InterContainerProxyOption {
return func(args *interContainerProxy) {
- args.kafkaHost = host
- }
-}
-
-func InterContainerPort(port int) InterContainerProxyOption {
- return func(args *interContainerProxy) {
- args.kafkaPort = port
+ args.kafkaAddress = address
}
}
@@ -145,9 +138,8 @@
func newInterContainerProxy(opts ...InterContainerProxyOption) *interContainerProxy {
proxy := &interContainerProxy{
- kafkaHost: DefaultKafkaHost,
- kafkaPort: DefaultKafkaPort,
- doneCh: make(chan struct{}),
+ kafkaAddress: DefaultKafkaAddress,
+ doneCh: make(chan struct{}),
}
for _, option := range opts {