Files
helmfile/pkg/plugins/vals.go
T
yxxhero ac23def893 add Go lint
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-07-16 20:21:11 +08:00

25 lines
390 B
Go

package plugins
import (
"sync"
"github.com/variantdev/vals"
)
const (
// cache size for improving performance of ref+.* secrets rendering
valsCacheSize = 512
)
var instance *vals.Runtime
var once sync.Once
func ValsInstance() (*vals.Runtime, error) {
var err error
once.Do(func() {
instance, err = vals.New(vals.Options{CacheSize: valsCacheSize})
})
return instance, err
}