Skip to content
Snippets Groups Projects
Commit e1711624 authored by yang-g's avatar yang-g
Browse files

V1Alpha as well

parent 3165c09c
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ using System.Text; ...@@ -36,7 +36,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
using Grpc.Health.V1Alpha; using Grpc.Health.V1;
using NUnit.Framework; using NUnit.Framework;
namespace Grpc.HealthCheck.Tests namespace Grpc.HealthCheck.Tests
...@@ -49,7 +49,7 @@ namespace Grpc.HealthCheck.Tests ...@@ -49,7 +49,7 @@ namespace Grpc.HealthCheck.Tests
const string Host = "localhost"; const string Host = "localhost";
Server server; Server server;
Channel channel; Channel channel;
Grpc.Health.V1Alpha.Health.IHealthClient client; Grpc.Health.V1.Health.IHealthClient client;
Grpc.HealthCheck.HealthServiceImpl serviceImpl; Grpc.HealthCheck.HealthServiceImpl serviceImpl;
[TestFixtureSetUp] [TestFixtureSetUp]
...@@ -59,13 +59,13 @@ namespace Grpc.HealthCheck.Tests ...@@ -59,13 +59,13 @@ namespace Grpc.HealthCheck.Tests
server = new Server server = new Server
{ {
Services = { Grpc.Health.V1Alpha.Health.BindService(serviceImpl) }, Services = { Grpc.Health.V1.Health.BindService(serviceImpl) },
Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } }
}; };
server.Start(); server.Start();
channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure);
client = Grpc.Health.V1Alpha.Health.NewClient(channel); client = Grpc.Health.V1.Health.NewClient(channel);
} }
[TestFixtureTearDown] [TestFixtureTearDown]
......
#region Copyright notice and license #region Copyright notice and license
// Copyright 2015, Google Inc. // Copyright 2015-2016, Google Inc.
// All rights reserved. // All rights reserved.
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
...@@ -36,7 +36,7 @@ using System.Text; ...@@ -36,7 +36,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
using Grpc.Health.V1Alpha; using Grpc.Health.V1;
using NUnit.Framework; using NUnit.Framework;
namespace Grpc.HealthCheck.Tests namespace Grpc.HealthCheck.Tests
......
...@@ -37,7 +37,7 @@ using System.Threading.Tasks; ...@@ -37,7 +37,7 @@ using System.Threading.Tasks;
using Grpc.Core; using Grpc.Core;
using Grpc.Core.Utils; using Grpc.Core.Utils;
using Grpc.Health.V1Alpha; using Grpc.Health.V1;
namespace Grpc.HealthCheck namespace Grpc.HealthCheck
{ {
...@@ -48,10 +48,10 @@ namespace Grpc.HealthCheck ...@@ -48,10 +48,10 @@ namespace Grpc.HealthCheck
/// <code> /// <code>
/// var serviceImpl = new HealthServiceImpl(); /// var serviceImpl = new HealthServiceImpl();
/// server = new Server(); /// server = new Server();
/// server.AddServiceDefinition(Grpc.Health.V1Alpha.Health.BindService(serviceImpl)); /// server.AddServiceDefinition(Grpc.Health.V1.Health.BindService(serviceImpl));
/// </code> /// </code>
/// </summary> /// </summary>
public class HealthServiceImpl : Grpc.Health.V1Alpha.Health.IHealth public class HealthServiceImpl : Grpc.Health.V1.Health.IHealth
{ {
private readonly object myLock = new object(); private readonly object myLock = new object();
private readonly Dictionary<Key, HealthCheckResponse.Types.ServingStatus> statusMap = private readonly Dictionary<Key, HealthCheckResponse.Types.ServingStatus> statusMap =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment