Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAndSubmitReflectorData(config dogeboxd.ServerConfig, networkManager dogeboxd.NetworkManager) error
- func DidEnterRecovery(dogeboxDataDir string) error
- func ForceRecoveryNextBoot(dataDir string) error
- func GetBuildType() (string, error)
- func GetInstallationMode(dbxState dogeboxd.DogeboxState) (dogeboxd.BootstrapInstallationMode, error)
- func GetSystemDisks() ([]dogeboxd.SystemDisk, error)
- func HasForceRecoveryFile(dataDir string) bool
- func InitStorageDevice(dbxState dogeboxd.DogeboxState) (string, error)
- func InstallToDisk(config dogeboxd.ServerConfig, dbxState dogeboxd.DogeboxState, name string) error
- func IsRecoveryMode(dogeboxDataDir string, sm dogeboxd.StateManager) bool
- func NewStateManager(store *dogeboxd.StoreManager) dogeboxd.StateManager
- func SaveReflectorTokenForReboot(config dogeboxd.ServerConfig, host, token string) error
- func ShouldEnterRecovery(dogeboxDataDir string, sm dogeboxd.StateManager) bool
- func UnforceRecoveryNextBoot(dataDir string) error
- type JournalReader
- type Keymap
- type LogTailer
- type ReflectorFileData
- type StateManager
- type SystemMonitor
- func (t SystemMonitor) GetFastMonChannel() chan string
- func (t SystemMonitor) GetFastStatChannel() chan map[string]dogeboxd.ProcStatus
- func (t SystemMonitor) GetMonChannel() chan []string
- func (t SystemMonitor) GetStatChannel() chan map[string]dogeboxd.ProcStatus
- func (t SystemMonitor) Run(started, stopped chan bool, stop chan context.Context) error
- type SystemUpdater
- func (t SystemUpdater) AddJob(j dogeboxd.Job)
- func (t SystemUpdater) AddSSHKey(key string, l dogeboxd.SubLogger) error
- func (t SystemUpdater) DisableSSH(l dogeboxd.SubLogger) error
- func (t SystemUpdater) EnableSSH(l dogeboxd.SubLogger) error
- func (t SystemUpdater) GetUpdateChannel() chan dogeboxd.Job
- func (t SystemUpdater) ListSSHKeys() ([]dogeboxd.DogeboxStateSSHKey, error)
- func (t SystemUpdater) RemoveSSHKey(id string, l dogeboxd.SubLogger) error
- func (t SystemUpdater) Run(started, stopped chan bool, stop chan context.Context) error
Constants ¶
View Source
const DBXRootSecret = "yes-i-will-destroy-everything-on-this-disk"
View Source
const (
MONITOR_INTERVAL time.Duration = 10 * time.Second
)
Variables ¶
View Source
var VALID_RECOVERY_FILES = []string{"RECOVERY", "RECOVERY.TXT"}
Functions ¶
func CheckAndSubmitReflectorData ¶
func CheckAndSubmitReflectorData(config dogeboxd.ServerConfig, networkManager dogeboxd.NetworkManager) error
func DidEnterRecovery ¶
func ForceRecoveryNextBoot ¶
func GetBuildType ¶
func GetInstallationMode ¶
func GetInstallationMode(dbxState dogeboxd.DogeboxState) (dogeboxd.BootstrapInstallationMode, error)
func GetSystemDisks ¶
func GetSystemDisks() ([]dogeboxd.SystemDisk, error)
func HasForceRecoveryFile ¶
func InitStorageDevice ¶
func InitStorageDevice(dbxState dogeboxd.DogeboxState) (string, error)
func InstallToDisk ¶
func InstallToDisk(config dogeboxd.ServerConfig, dbxState dogeboxd.DogeboxState, name string) error
func IsRecoveryMode ¶
func IsRecoveryMode(dogeboxDataDir string, sm dogeboxd.StateManager) bool
func NewStateManager ¶
func NewStateManager(store *dogeboxd.StoreManager) dogeboxd.StateManager
func SaveReflectorTokenForReboot ¶
func SaveReflectorTokenForReboot(config dogeboxd.ServerConfig, host, token string) error
func ShouldEnterRecovery ¶
func ShouldEnterRecovery(dogeboxDataDir string, sm dogeboxd.StateManager) bool
This function should do detection on whether or not we should enter our "Recovery Mode". This can always be overriden by a CLI flag if necessary. This will not return true if the current instance of dogeboxd has booted in recovery. Use `IsRecoveryMode()` for that.
func UnforceRecoveryNextBoot ¶
Types ¶
type JournalReader ¶
type JournalReader struct {
// contains filtered or unexported fields
}
func NewJournalReader ¶
func NewJournalReader(config dogeboxd.ServerConfig) JournalReader
func (JournalReader) GetJournalChan ¶
func (t JournalReader) GetJournalChan(service string) (context.CancelFunc, chan string, error)
type Keymap ¶
func GetKeymaps ¶
type LogTailer ¶
type LogTailer struct {
// contains filtered or unexported fields
}
func NewLogTailer ¶
func NewLogTailer(config dogeboxd.ServerConfig) LogTailer
type ReflectorFileData ¶
type StateManager ¶
type StateManager struct {
// contains filtered or unexported fields
}
func (*StateManager) Get ¶
func (s *StateManager) Get() dogeboxd.State
func (*StateManager) SetDogebox ¶
func (s *StateManager) SetDogebox(dbs dogeboxd.DogeboxState) error
func (*StateManager) SetNetwork ¶
func (s *StateManager) SetNetwork(ns dogeboxd.NetworkState) error
func (*StateManager) SetSources ¶
func (s *StateManager) SetSources(state dogeboxd.SourceState) error
type SystemMonitor ¶
type SystemMonitor struct {
// contains filtered or unexported fields
}
func NewSystemMonitor ¶
func NewSystemMonitor(config dogeboxd.ServerConfig) SystemMonitor
func (SystemMonitor) GetFastMonChannel ¶
func (t SystemMonitor) GetFastMonChannel() chan string
func (SystemMonitor) GetFastStatChannel ¶
func (t SystemMonitor) GetFastStatChannel() chan map[string]dogeboxd.ProcStatus
func (SystemMonitor) GetMonChannel ¶
func (t SystemMonitor) GetMonChannel() chan []string
func (SystemMonitor) GetStatChannel ¶
func (t SystemMonitor) GetStatChannel() chan map[string]dogeboxd.ProcStatus
type SystemUpdater ¶
type SystemUpdater struct {
// contains filtered or unexported fields
}
func NewSystemUpdater ¶
func NewSystemUpdater(config dogeboxd.ServerConfig, networkManager dogeboxd.NetworkManager, nixManager dogeboxd.NixManager, sourceManager dogeboxd.SourceManager, pupManager dogeboxd.PupManager, stateManager dogeboxd.StateManager, dkm dogeboxd.DKMManager) SystemUpdater
func (SystemUpdater) AddJob ¶
func (t SystemUpdater) AddJob(j dogeboxd.Job)
func (SystemUpdater) AddSSHKey ¶
func (t SystemUpdater) AddSSHKey(key string, l dogeboxd.SubLogger) error
func (SystemUpdater) DisableSSH ¶
func (t SystemUpdater) DisableSSH(l dogeboxd.SubLogger) error
func (SystemUpdater) GetUpdateChannel ¶
func (t SystemUpdater) GetUpdateChannel() chan dogeboxd.Job
func (SystemUpdater) ListSSHKeys ¶
func (t SystemUpdater) ListSSHKeys() ([]dogeboxd.DogeboxStateSSHKey, error)
func (SystemUpdater) RemoveSSHKey ¶
func (t SystemUpdater) RemoveSSHKey(id string, l dogeboxd.SubLogger) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.