*: enforce max lease TTL with 9,000,000,000 seconds

math.MaxInt64 / time.Second is 9,223,372,036. 9,000,000,000 is easier to
remember/document.
This commit is contained in:
Iwasaki Yudai
2018-03-07 16:32:04 -08:00
committed by Gyuho Lee
parent 4704232cb6
commit db21941d1d
5 changed files with 40 additions and 11 deletions

View File

@ -52,8 +52,9 @@ var toGRPCErrorMap = map[error]error{
etcdserver.ErrKeyNotFound: rpctypes.ErrGRPCKeyNotFound,
etcdserver.ErrCorrupt: rpctypes.ErrGRPCCorrupt,
lease.ErrLeaseNotFound: rpctypes.ErrGRPCLeaseNotFound,
lease.ErrLeaseExists: rpctypes.ErrGRPCLeaseExist,
lease.ErrLeaseNotFound: rpctypes.ErrGRPCLeaseNotFound,
lease.ErrLeaseExists: rpctypes.ErrGRPCLeaseExist,
lease.ErrLeaseTTLTooLarge: rpctypes.ErrGRPCLeaseTTLTooLarge,
auth.ErrRootUserNotExist: rpctypes.ErrGRPCRootUserNotExist,
auth.ErrRootRoleNotExist: rpctypes.ErrGRPCRootRoleNotExist,