[VOL-4290] Voltha go library updates for gRPC migration
Change-Id: I1aa2774beb6b7ed7419bc45aeb53fcae8a8ecda0
diff --git a/pkg/kafka/client.go b/pkg/kafka/client.go
index eee9631..fdc05bc 100755
--- a/pkg/kafka/client.go
+++ b/pkg/kafka/client.go
@@ -12,6 +12,11 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
+ *
+ *
+ * NOTE: The kafka client is used to publish events on Kafka in voltha
+ * release 2.9. It is no longer used for inter voltha container
+ * communication.
*/
package kafka
@@ -19,7 +24,7 @@
"context"
"time"
- ca "github.com/opencord/voltha-protos/v4/go/inter_container"
+ "github.com/golang/protobuf/proto"
)
const (
@@ -55,6 +60,7 @@
DefaultNumberReplicas = 1
DefaultAutoCreateTopic = false
DefaultMetadataMaxRetry = 3
+ DefaultMaxRetries = 3
DefaultLivenessChannelInterval = time.Second * 30
)
@@ -64,8 +70,8 @@
Stop(ctx context.Context)
CreateTopic(ctx context.Context, topic *Topic, numPartition int, repFactor int) error
DeleteTopic(ctx context.Context, topic *Topic) error
- Subscribe(ctx context.Context, topic *Topic, kvArgs ...*KVArg) (<-chan *ca.InterContainerMessage, error)
- UnSubscribe(ctx context.Context, topic *Topic, ch <-chan *ca.InterContainerMessage) error
+ Subscribe(ctx context.Context, topic *Topic, kvArgs ...*KVArg) (<-chan proto.Message, error)
+ UnSubscribe(ctx context.Context, topic *Topic, ch <-chan proto.Message) error
SubscribeForMetadata(context.Context, func(fromTopic string, timestamp time.Time))
Send(ctx context.Context, msg interface{}, topic *Topic, keys ...string) error
SendLiveness(ctx context.Context) error