Get rid of legacy client/v3/naming API.

Update grpcproxy to use the new abstractions.
This commit is contained in:
Piotr Tabor
2021-01-21 22:17:10 +01:00
parent 3fddea9669
commit a836a8045b
6 changed files with 60 additions and 329 deletions

View File

@ -43,7 +43,7 @@ func (m *endpointManager) Update(ctx context.Context, updates []*UpdateWithOpts)
ops := make([]clientv3.Op, 0, len(updates))
for _, update := range updates {
if !strings.HasPrefix(update.Key, m.target+"/") {
return status.Errorf(codes.InvalidArgument, "endpoints: endpoint key should be prefixed with %s/", m.target)
return status.Errorf(codes.InvalidArgument, "endpoints: endpoint key should be prefixed with '%s/' got: '%s'", m.target, update.Key)
}
switch update.Op {