Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

531 B
Raw Blame
package api

import (
	"fmt"
	"os"

	"github.com/rcourtman/pulse-go-rewrite/internal/config"
)

func loadHostedAwareAIConfig(hostedMode bool, billingBaseDir, orgID string, persistence *config.ConfigPersistence) (*config.AIConfig, error) {
	if persistence == nil {
		return nil, fmt.Errorf("Pulse Assistant config persistence unavailable")
	}

	cfg, err := persistence.LoadAIConfig()
	if err != nil {
		return nil, err
	}
	return cfg, nil
}

func hostedModeEnabledFromEnv() bool {
	return os.Getenv("PULSE_HOSTED_MODE") == "true"
}