document response wrapping behavior (#8156)

Document response wrapping behavior so that it's clear how
WrappingLookupFuncs should behave.
This commit is contained in:
Billie Cleek
2020-06-08 07:50:48 -07:00
committed by GitHub
parent 8bd298f0f5
commit 62d0ecff3d
2 changed files with 7 additions and 5 deletions

View File

@@ -21,8 +21,9 @@ var (
// changed
DefaultWrappingTTL = "5m"
// The default function used if no other function is set, which honors the
// env var and wraps `sys/wrapping/wrap`
// The default function used if no other function is set. It honors the env
// var to set the wrap TTL. The default wrap TTL will apply when when writing
// to `sys/wrapping/wrap` when the env var is not set.
DefaultWrappingLookupFunc = func(operation, path string) string {
if os.Getenv(EnvVaultWrapTTL) != "" {
return os.Getenv(EnvVaultWrapTTL)