zero: fix bootstrap config path

This commit is contained in:
Denis Mishin 2024-03-21 17:38:56 -04:00
parent 4193583301
commit 3ac74c68ca
7 changed files with 36 additions and 33 deletions

View file

@ -25,7 +25,7 @@ type Source struct {
api *sdk.API
fileCachePath string
fileCachePath *string
fileCipher cipher.AEAD
checkForUpdate chan struct{}
@ -33,7 +33,7 @@ type Source struct {
}
// New creates a new bootstrap config source
func New(secret []byte) (*Source, error) {
func New(secret []byte, fileCachePath *string, api *sdk.API) (*Source, error) {
cfg := new(config.Config)
err := setConfigDefaults(cfg)
@ -54,7 +54,9 @@ func New(secret []byte) (*Source, error) {
}
svc := &Source{
api: api,
source: source{ready: make(chan struct{})},
fileCachePath: fileCachePath,
fileCipher: cipher,
checkForUpdate: make(chan struct{}, 1),
}