app

package
v0.9.2-dev.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: GPL-3.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatStartupError added in v0.7.3

func FormatStartupError(err error) string

FormatStartupError returns a control-plane last_error that never includes secrets, tokens, or raw unknown error text.

func NewDegradedStore added in v0.7.3

func NewDegradedStore(version string, err error) *state.Store

NewDegradedStore returns an in-memory store with health=degraded and a sanitized last_error derived from a daemon assembly failure.

Types

type DaemonVersionClient added in v0.7.0

type DaemonVersionClient interface {
	Status(context.Context) (protocol.Status, error)
}

DaemonVersionClient reads the daemon version through the local control API.

type InstalledServiceUpdater added in v0.7.0

type InstalledServiceUpdater interface {
	UpdateInstalledBinary() (bool, error)
}

InstalledServiceUpdater synchronizes and restarts an installed Mihari OS service. The boolean result reports whether a service installation exists.

type RuntimeAssembly

type RuntimeAssembly struct {
	Manager *runtimeapi.Manager
	Store   *state.Store
	Web     *web.Server
	// contains filtered or unexported fields
}

func BuildRuntime

func BuildRuntime(paths platform.Paths, settings config.Settings, daemonVersion string, stdout, stderr io.Writer) (*RuntimeAssembly, error)

func BuildRuntimeWithOptions

func BuildRuntimeWithOptions(paths platform.Paths, settings config.Settings, daemonVersion string, stdout, stderr io.Writer, options RuntimeBuildOptions) (*RuntimeAssembly, error)

type RuntimeBuildOptions

type RuntimeBuildOptions struct {
	InitialSetupRequired bool
	SettingsPath         string
	ServiceStatus        func() (string, error)
	Logging              runtimeapi.LoggingRuntime
	RefreshLogSecrets    func(catalogURLs []string)
	MihomoStdout         io.Writer
	MihomoStderr         io.Writer
	SaveOnboardingState  func(string, onboarding.State) (config.CommitResult, error)
	OnBackgroundError    func(component string, err error)
}

type SelfUpdateServiceCompletion added in v0.7.0

type SelfUpdateServiceCompletion struct {
	// contains filtered or unexported fields
}

SelfUpdateServiceCompletion coordinates the post-replacement service update and verifies that the restarted daemon reports the new Mihari version.

func NewSelfUpdateServiceCompletion added in v0.7.0

func NewSelfUpdateServiceCompletion(service InstalledServiceUpdater, client DaemonVersionClient) *SelfUpdateServiceCompletion

NewSelfUpdateServiceCompletion returns a post-replacement service coordinator.

func (*SelfUpdateServiceCompletion) AfterReplace added in v0.7.0

func (c *SelfUpdateServiceCompletion) AfterReplace(ctx context.Context, version string) error

AfterReplace updates an installed service and waits until its daemon reports version. A missing service is a successful no-op.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL