func (updater *noOpActualStateUpdater) UpdateComponentInstance(key string, makeChanges func(instance *resolve.ComponentInstance)) error {
	updater.mutex.Lock()
	defer updater.mutex.Unlock()
	instance, ok := updater.actualState.ComponentInstanceMap[key]
	if !ok {
		return fmt.Errorf("instance not found in actual state")
	}
	instance.UpdatedAt = time.Now()
	makeChanges(instance)
	return nil
}
UpdateComponentInstance updates an existing component instance in the actual state
package actual
import (
	"fmt"
	"sync"
	"time"
	"github.com/Aptomi/aptomi/pkg/engine/resolve"
)
type noOpActualStateUpdater struct {
	mutex       sync.Mutex
	actualState *resolve.PolicyResolution
}
func NewNoOpActionStateUpdater(actualState *resolve.PolicyResolution) StateUpdater {
	return &noOpActualStateUpdater{
		actualState: actualState,
	}
}
func (updater *noOpActualStateUpdater) GetComponentInstance(key string) *resolve.ComponentInstance {
	updater.mutex.Lock()
	defer updater.mutex.Unlock()
	return updater.actualState.ComponentInstanceMap[key]
}
func (updater *noOpActualStateUpdater) CreateComponentInstance(instance *resolve.ComponentInstance) error {
	updater.mutex.Lock()
	defer updater.mutex.Unlock()
	instance.CreatedAt = time.Now()
	instance.UpdatedAt = time.Now()
	updater.actualState.ComponentInstanceMap[instance.GetKey()] = instance
	return nil
}