[VOL-4442] grpc streaming connection monitoring

Change-Id: I435a03fdc0ac2b549dc4512220148cb19c16db19
diff --git a/vendor/github.com/opencord/voltha-protos/v5/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go b/vendor/github.com/opencord/voltha-protos/v5/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go
index 93dade6..1e5c21c 100644
--- a/vendor/github.com/opencord/voltha-protos/v5/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v5/go/olt_inter_adapter_service/olt_inter_adapter_service.pb.go
@@ -33,28 +33,29 @@
 }
 
 var fileDescriptor_3ddb40a5aae0f6e1 = []byte{
-	// 330 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x3f, 0x4f, 0xf3, 0x30,
-	0x10, 0x87, 0xf5, 0xbe, 0x03, 0x83, 0x17, 0xc0, 0x42, 0x95, 0x48, 0x59, 0x18, 0x19, 0xea, 0x20,
-	0x10, 0x13, 0x53, 0xcb, 0x9f, 0xb6, 0x03, 0x6a, 0x45, 0x11, 0x03, 0x4b, 0xe5, 0xba, 0xd7, 0x24,
-	0x92, 0xe3, 0x0b, 0xf6, 0xa5, 0xd0, 0x6f, 0xc1, 0x27, 0xe4, 0xb3, 0xa0, 0xc4, 0xee, 0x90, 0xa8,
-	0x99, 0xa2, 0xe8, 0x9e, 0xdf, 0xe3, 0x3b, 0xdd, 0xb1, 0xc1, 0x16, 0x35, 0xa5, 0x72, 0x59, 0x58,
-	0x24, 0x74, 0x31, 0x6a, 0x5a, 0x66, 0x86, 0xc0, 0x2e, 0xe5, 0x5a, 0x16, 0xd5, 0xd7, 0x81, 0xdd,
-	0x66, 0x0a, 0x44, 0x0d, 0xf0, 0xf3, 0x4e, 0x20, 0x8a, 0x9a, 0x26, 0x85, 0x79, 0x8e, 0xc6, 0xc7,
-	0xa2, 0x7e, 0x82,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, 0x2d, 0x22, 0xde, 0x3b, 0x63, 0xef, 0x1c, 0x84,
-	0x05, 0x6f, 0xef, 0xe2, 0x04, 0xbb, 0x8f, 0x71, 0x75, 0x54, 0x73, 0xb7, 0x7f, 0x01, 0x00, 0x00,
-	0xff, 0xff, 0xac, 0x65, 0xa9, 0x8b, 0xbe, 0x02, 0x00, 0x00,
+	// 337 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x4e, 0xe3, 0x30,
+	0x10, 0x87, 0xd5, 0x3d, 0xec, 0xc1, 0x97, 0xdd, 0xb5, 0x56, 0x95, 0x48, 0xb9, 0x70, 0x83, 0x43,
+	0x9d, 0x0a, 0xc4, 0x19, 0xb5, 0xfc, 0x69, 0x7b, 0x40, 0xad, 0x28, 0xe2, 0xc0, 0xa5, 0x72, 0xdd,
+	0x69, 0x12, 0xc9, 0xf1, 0x04, 0x7b, 0x52, 0xe8, 0x5b, 0xf0, 0x8c, 0x3c, 0x09, 0x4a, 0xec, 0x4a,
+	0xa4, 0x6a, 0x4e, 0x51, 0x34, 0xdf, 0xef, 0xf3, 0x8c, 0x66, 0x58, 0x7f, 0x8b, 0x9a, 0x52, 0xb9,
+	0x2c, 0x2c, 0x12, 0xba, 0x18, 0x35, 0x2d, 0x33, 0x43, 0x60, 0x97, 0x72, 0x2d, 0x8b, 0xea, 0xeb,
+	0xc0, 0x6e, 0x33, 0x05, 0xa2, 0x06, 0xf8, 0x49, 0x2b, 0x10, 0x45, 0x4d, 0x93, 0xc2, 0x3c, 0x47,
+	0xe3, 0x63, 0x51, 0x2f, 0x41, 0x4c, 0x34, 0xc4, 0xf5, 0xdf, 0xaa, 0xdc, 0xc4, 0x90, 0x17, 0xb4,
+	0x0b, 0xc5, 0xb3, 0x66, 0xb0, 0x61, 0x0f, 0xc8, 0x81, 0x3b, 0x05, 0xa9, 0x29, 0xf5, 0xb5, 0xc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x01, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x9f, 0xd5, 0x8e, 0xc2, 0x02, 0x00,
+	0x00,
 }
 
 // Reference imports to suppress errors if they are not otherwise used.
@@ -69,9 +70,9 @@
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
 type OltInterAdapterServiceClient interface {
-	// GetHealthStatus is used by an OltInterAdapterService client to verify connectivity
-	// to the gRPC server hosting the OltInterAdapterService service
-	GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error)
+	// GetHealthStatus is used by a OltInterAdapterService client to detect a connection
+	// lost with the gRPC server hosting the OltInterAdapterService service
+	GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (OltInterAdapterService_GetHealthStatusClient, error)
 	ProxyOmciRequest(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*empty.Empty, error)
 	ProxyOmciRequests(ctx context.Context, in *inter_adapter.OmciMessages, opts ...grpc.CallOption) (*empty.Empty, error)
 	GetTechProfileInstance(ctx context.Context, in *inter_adapter.TechProfileInstanceRequestMessage, opts ...grpc.CallOption) (*inter_adapter.TechProfileDownloadMessage, error)
@@ -85,13 +86,35 @@
 	return &oltInterAdapterServiceClient{cc}
 }
 
-func (c *oltInterAdapterServiceClient) GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error) {
-	out := new(health.HealthStatus)
-	err := c.cc.Invoke(ctx, "/olt_inter_adapter_service.OltInterAdapterService/GetHealthStatus", in, out, opts...)
+func (c *oltInterAdapterServiceClient) GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (OltInterAdapterService_GetHealthStatusClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_OltInterAdapterService_serviceDesc.Streams[0], "/olt_inter_adapter_service.OltInterAdapterService/GetHealthStatus", opts...)
 	if err != nil {
 		return nil, err
 	}
-	return out, nil
+	x := &oltInterAdapterServiceGetHealthStatusClient{stream}
+	return x, nil
+}
+
+type OltInterAdapterService_GetHealthStatusClient interface {
+	Send(*common.Connection) error
+	Recv() (*health.HealthStatus, error)
+	grpc.ClientStream
+}
+
+type oltInterAdapterServiceGetHealthStatusClient struct {
+	grpc.ClientStream
+}
+
+func (x *oltInterAdapterServiceGetHealthStatusClient) Send(m *common.Connection) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *oltInterAdapterServiceGetHealthStatusClient) Recv() (*health.HealthStatus, error) {
+	m := new(health.HealthStatus)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
 }
 
 func (c *oltInterAdapterServiceClient) ProxyOmciRequest(ctx context.Context, in *inter_adapter.OmciMessage, opts ...grpc.CallOption) (*empty.Empty, error) {
@@ -123,9 +146,9 @@
 
 // OltInterAdapterServiceServer is the server API for OltInterAdapterService service.
 type OltInterAdapterServiceServer interface {
-	// GetHealthStatus is used by an OltInterAdapterService client to verify connectivity
-	// to the gRPC server hosting the OltInterAdapterService service
-	GetHealthStatus(context.Context, *common.Connection) (*health.HealthStatus, error)
+	// GetHealthStatus is used by a OltInterAdapterService client to detect a connection
+	// lost with the gRPC server hosting the OltInterAdapterService service
+	GetHealthStatus(OltInterAdapterService_GetHealthStatusServer) error
 	ProxyOmciRequest(context.Context, *inter_adapter.OmciMessage) (*empty.Empty, error)
 	ProxyOmciRequests(context.Context, *inter_adapter.OmciMessages) (*empty.Empty, error)
 	GetTechProfileInstance(context.Context, *inter_adapter.TechProfileInstanceRequestMessage) (*inter_adapter.TechProfileDownloadMessage, error)
@@ -135,8 +158,8 @@
 type UnimplementedOltInterAdapterServiceServer struct {
 }
 
-func (*UnimplementedOltInterAdapterServiceServer) GetHealthStatus(ctx context.Context, req *common.Connection) (*health.HealthStatus, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
+func (*UnimplementedOltInterAdapterServiceServer) GetHealthStatus(srv OltInterAdapterService_GetHealthStatusServer) error {
+	return status.Errorf(codes.Unimplemented, "method GetHealthStatus not implemented")
 }
 func (*UnimplementedOltInterAdapterServiceServer) ProxyOmciRequest(ctx context.Context, req *inter_adapter.OmciMessage) (*empty.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method ProxyOmciRequest not implemented")
@@ -152,22 +175,30 @@
 	s.RegisterService(&_OltInterAdapterService_serviceDesc, srv)
 }
 
-func _OltInterAdapterService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(common.Connection)
-	if err := dec(in); err != nil {
+func _OltInterAdapterService_GetHealthStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(OltInterAdapterServiceServer).GetHealthStatus(&oltInterAdapterServiceGetHealthStatusServer{stream})
+}
+
+type OltInterAdapterService_GetHealthStatusServer interface {
+	Send(*health.HealthStatus) error
+	Recv() (*common.Connection, error)
+	grpc.ServerStream
+}
+
+type oltInterAdapterServiceGetHealthStatusServer struct {
+	grpc.ServerStream
+}
+
+func (x *oltInterAdapterServiceGetHealthStatusServer) Send(m *health.HealthStatus) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *oltInterAdapterServiceGetHealthStatusServer) Recv() (*common.Connection, error) {
+	m := new(common.Connection)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
 		return nil, err
 	}
-	if interceptor == nil {
-		return srv.(OltInterAdapterServiceServer).GetHealthStatus(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/olt_inter_adapter_service.OltInterAdapterService/GetHealthStatus",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(OltInterAdapterServiceServer).GetHealthStatus(ctx, req.(*common.Connection))
-	}
-	return interceptor(ctx, in, info, handler)
+	return m, nil
 }
 
 func _OltInterAdapterService_ProxyOmciRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -229,10 +260,6 @@
 	HandlerType: (*OltInterAdapterServiceServer)(nil),
 	Methods: []grpc.MethodDesc{
 		{
-			MethodName: "GetHealthStatus",
-			Handler:    _OltInterAdapterService_GetHealthStatus_Handler,
-		},
-		{
 			MethodName: "ProxyOmciRequest",
 			Handler:    _OltInterAdapterService_ProxyOmciRequest_Handler,
 		},
@@ -245,6 +272,13 @@
 			Handler:    _OltInterAdapterService_GetTechProfileInstance_Handler,
 		},
 	},
-	Streams:  []grpc.StreamDesc{},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "GetHealthStatus",
+			Handler:       _OltInterAdapterService_GetHealthStatus_Handler,
+			ServerStreams: true,
+			ClientStreams: true,
+		},
+	},
 	Metadata: "voltha_protos/olt_inter_adapter_service.proto",
 }