diff --git a/health/grpc_health_v1alpha/health.pb.go b/health/grpc_health_v1/health.pb.go similarity index 89% rename from health/grpc_health_v1alpha/health.pb.go rename to health/grpc_health_v1/health.pb.go index 8e89dc9f2..bfe238ee9 100644 --- a/health/grpc_health_v1alpha/health.pb.go +++ b/health/grpc_health_v1/health.pb.go @@ -3,7 +3,7 @@ // DO NOT EDIT! /* -Package grpc_health_v1alpha is a generated protocol buffer package. +Package grpc_health_v1 is a generated protocol buffer package. It is generated from these files: health.proto @@ -12,7 +12,7 @@ It has these top-level messages: HealthCheckRequest HealthCheckResponse */ -package grpc_health_v1alpha +package grpc_health_v1 import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -68,7 +68,7 @@ func (*HealthCheckRequest) ProtoMessage() {} func (*HealthCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } type HealthCheckResponse struct { - Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,enum=grpc.health.v1alpha.HealthCheckResponse_ServingStatus" json:"status,omitempty"` + Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,enum=grpc.health.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"` } func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } @@ -77,9 +77,9 @@ func (*HealthCheckResponse) ProtoMessage() {} func (*HealthCheckResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } func init() { - proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v1alpha.HealthCheckRequest") - proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v1alpha.HealthCheckResponse") - proto.RegisterEnum("grpc.health.v1alpha.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) + proto.RegisterType((*HealthCheckRequest)(nil), "grpc.health.v1.HealthCheckRequest") + proto.RegisterType((*HealthCheckResponse)(nil), "grpc.health.v1.HealthCheckResponse") + proto.RegisterEnum("grpc.health.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -102,7 +102,7 @@ func NewHealthClient(cc *grpc.ClientConn) HealthClient { func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { out := new(HealthCheckResponse) - err := grpc.Invoke(ctx, "/grpc.health.v1alpha.Health/Check", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/grpc.health.v1.Health/Check", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -132,7 +132,7 @@ func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interf } var _Health_serviceDesc = grpc.ServiceDesc{ - ServiceName: "grpc.health.v1alpha.Health", + ServiceName: "grpc.health.v1.Health", HandlerType: (*HealthServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/health/grpc_health_v1alpha/health.proto b/health/grpc_health_v1/health.proto similarity index 90% rename from health/grpc_health_v1alpha/health.proto rename to health/grpc_health_v1/health.proto index 91c7f06e9..e2dc08892 100644 --- a/health/grpc_health_v1alpha/health.proto +++ b/health/grpc_health_v1/health.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package grpc.health.v1alpha; +package grpc.health.v1; message HealthCheckRequest { string service = 1; diff --git a/health/health.go b/health/health.go index 7930bde7f..f74fd69bc 100644 --- a/health/health.go +++ b/health/health.go @@ -8,7 +8,7 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" - healthpb "google.golang.org/grpc/health/grpc_health_v1alpha" + healthpb "google.golang.org/grpc/health/grpc_health_v1" ) type HealthServer struct { diff --git a/test/end2end_test.go b/test/end2end_test.go index d5f63ee8a..36629b248 100644 --- a/test/end2end_test.go +++ b/test/end2end_test.go @@ -58,7 +58,7 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/health" - healthpb "google.golang.org/grpc/health/grpc_health_v1alpha" + healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" testpb "google.golang.org/grpc/test/grpc_testing" @@ -603,13 +603,13 @@ func TestHealthCheckOnSuccess(t *testing.T) { func testHealthCheckOnSuccess(t *testing.T, e env) { te := newTest(t, e) hs := health.NewHealthServer() - hs.SetServingStatus("grpc.health.v1alpha.Health", 1) + hs.SetServingStatus("grpc.health.v1.Health", 1) te.healthServer = hs te.startServer() defer te.tearDown() cc := te.clientConn() - if _, err := healthCheck(1*time.Second, cc, "grpc.health.v1alpha.Health"); err != nil { + if _, err := healthCheck(1*time.Second, cc, "grpc.health.v1.Health"); err != nil { t.Fatalf("Health/Check(_, _) = _, %v, want _, ", err) } } @@ -629,13 +629,13 @@ func testHealthCheckOnFailure(t *testing.T, e env) { "grpc: the client connection is closing; please retry", ) hs := health.NewHealthServer() - hs.SetServingStatus("grpc.health.v1alpha.HealthCheck", 1) + hs.SetServingStatus("grpc.health.v1.HealthCheck", 1) te.healthServer = hs te.startServer() defer te.tearDown() cc := te.clientConn() - if _, err := healthCheck(0*time.Second, cc, "grpc.health.v1alpha.Health"); err != grpc.Errorf(codes.DeadlineExceeded, "context deadline exceeded") { + if _, err := healthCheck(0*time.Second, cc, "grpc.health.v1.Health"); err != grpc.Errorf(codes.DeadlineExceeded, "context deadline exceeded") { t.Fatalf("Health/Check(_, _) = _, %v, want _, error code %d", err, codes.DeadlineExceeded) } awaitNewConnLogOutput() @@ -652,7 +652,7 @@ func testHealthCheckOff(t *testing.T, e env) { te := newTest(t, e) te.startServer() defer te.tearDown() - want := grpc.Errorf(codes.Unimplemented, "unknown service grpc.health.v1alpha.Health") + want := grpc.Errorf(codes.Unimplemented, "unknown service grpc.health.v1.Health") if _, err := healthCheck(1*time.Second, te.clientConn(), ""); err != want { t.Fatalf("Health/Check(_, _) = _, %v, want _, error %v", err, want) } @@ -680,19 +680,19 @@ func testHealthCheckServingStatus(t *testing.T, e env) { if out.Status != healthpb.HealthCheckResponse_SERVING { t.Fatalf("Got the serving status %v, want SERVING", out.Status) } - if _, err := healthCheck(1*time.Second, cc, "grpc.health.v1alpha.Health"); err != grpc.Errorf(codes.NotFound, "unknown service") { + if _, err := healthCheck(1*time.Second, cc, "grpc.health.v1.Health"); err != grpc.Errorf(codes.NotFound, "unknown service") { t.Fatalf("Health/Check(_, _) = _, %v, want _, error code %d", err, codes.NotFound) } - hs.SetServingStatus("grpc.health.v1alpha.Health", healthpb.HealthCheckResponse_SERVING) - out, err = healthCheck(1*time.Second, cc, "grpc.health.v1alpha.Health") + hs.SetServingStatus("grpc.health.v1.Health", healthpb.HealthCheckResponse_SERVING) + out, err = healthCheck(1*time.Second, cc, "grpc.health.v1.Health") if err != nil { t.Fatalf("Health/Check(_, _) = _, %v, want _, ", err) } if out.Status != healthpb.HealthCheckResponse_SERVING { t.Fatalf("Got the serving status %v, want SERVING", out.Status) } - hs.SetServingStatus("grpc.health.v1alpha.Health", healthpb.HealthCheckResponse_NOT_SERVING) - out, err = healthCheck(1*time.Second, cc, "grpc.health.v1alpha.Health") + hs.SetServingStatus("grpc.health.v1.Health", healthpb.HealthCheckResponse_NOT_SERVING) + out, err = healthCheck(1*time.Second, cc, "grpc.health.v1.Health") if err != nil { t.Fatalf("Health/Check(_, _) = _, %v, want _, ", err) }