Example #1
0
func NewVFSStateStore(base vfs.Path, clusterName string, dryrun bool) (*VFSStateStore, error) {
	location := base.Join(clusterName)
	s := &VFSStateStore{
		location: location,
	}
	var err error
	s.ca, err = NewVFSCAStore(location.Join("pki"), dryrun)
	if err != nil {
		return nil, fmt.Errorf("error building CA store: %v", err)
	}
	s.secrets, err = NewVFSSecretStore(location.Join("secrets"))
	if err != nil {
		return nil, fmt.Errorf("error building secret store: %v", err)
	}

	return s, nil
}