Commit fc8ff61e authored by Mike Danese's avatar Mike Danese

kms: rename KMSService to KeyManagmentService

KMSService is redundent.
parent da564ef4
......@@ -46,7 +46,7 @@ const (
// The gRPC implementation for envelope.Service.
type gRPCService struct {
// gRPC client instance
kmsClient kmsapi.KMSServiceClient
kmsClient kmsapi.KeyManagementServiceClient
connection *grpc.ClientConn
}
......@@ -64,7 +64,7 @@ func NewGRPCService(endpoint string) (Service, error) {
return nil, fmt.Errorf("connect remote KMS provider %q failed, error: %v", addr, err)
}
kmsClient := kmsapi.NewKMSServiceClient(connection)
kmsClient := kmsapi.NewKeyManagementServiceClient(connection)
err = checkAPIVersion(kmsClient)
if err != nil {
......@@ -99,7 +99,7 @@ func parseEndpoint(endpoint string) (string, error) {
// Check the KMS provider API version.
// Only matching kmsapiVersion is supported now.
func checkAPIVersion(kmsClient kmsapi.KMSServiceClient) error {
func checkAPIVersion(kmsClient kmsapi.KeyManagementServiceClient) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
......
......@@ -124,7 +124,7 @@ func startTestKMSProvider() (*grpc.Server, error) {
}
server := grpc.NewServer()
kmsapi.RegisterKMSServiceServer(server, &base64Server{})
kmsapi.RegisterKeyManagementServiceServer(server, &base64Server{})
go server.Serve(listener)
return server, nil
}
......
......@@ -4,7 +4,7 @@ syntax = "proto3";
package v1beta1;
// This service defines the public APIs for remote KMS provider.
service KMSService {
service KeyManagementService {
// Version returns the runtime name and runtime version of the KMS provider.
rpc Version(VersionRequest) returns (VersionResponse) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment