startup

package
v1.17.4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRequestedRuntimeIdentity

func ApplyRequestedRuntimeIdentity(ctx context.Context) error

ApplyRequestedRuntimeIdentity switches the current process to the configured runtime UID/GID before the rest of the app initializes.

func CleanupUnknownSettings

func CleanupUnknownSettings(ctx context.Context, settingsMgr SettingsPruner)

func EnsureEncryptionKey

func EnsureEncryptionKey(ctx context.Context, cfg *RuntimeConfig, ensureKeyFunc func(context.Context) (string, error))

func InitializeAutoLogin

func InitializeAutoLogin(ctx context.Context, cfg *RuntimeConfig)

func InitializeDefaultSettings

func InitializeDefaultSettings(ctx context.Context, cfg *RuntimeConfig, settingsMgr SettingsManager)

func InitializeNonAgentFeatures

func InitializeNonAgentFeatures(
	ctx context.Context,
	cfg *RuntimeConfig,
	createAdminFunc func(context.Context) error,
	reconcileDefaultAdminAPIKeyFunc func(context.Context) error,
	autoLoginInitFunc func(context.Context) error,
	migrateOidcFunc func(context.Context) error,
	migrateDiscordFunc func(context.Context) error,
)

func LoadAgentToken

func LoadAgentToken(ctx context.Context, cfg *RuntimeConfig, getSettingFunc func(context.Context, string, string) string)

func MigrateGitOpsSyncIntervals

func MigrateGitOpsSyncIntervals(
	ctx context.Context,
	listFunc func(context.Context) ([]IntervalMigrationItem, error),
	updateFunc func(context.Context, string, int) error,
)

func MigrateSchedulerCronValues

func MigrateSchedulerCronValues(
	ctx context.Context,
	getSettingFunc func(context.Context, string, string) string,
	updateSettingFunc func(context.Context, string, string) error,
	reloadFunc func(context.Context) error,
)

func TestDockerConnection

func TestDockerConnection(ctx context.Context, testFunc func(context.Context) error)

Types

type IntervalMigrationItem

type IntervalMigrationItem struct {
	ID       string
	RawValue string
}

type RuntimeConfig

type RuntimeConfig struct {
	AgentMode         bool
	AgentToken        string
	Environment       string
	EncryptionKey     string
	AutoLoginUsername string
	AdminStaticAPIKey string
}

type SettingsManager

type SettingsManager interface {
	PersistEnvSettingsIfMissing(ctx context.Context) error
	SetBoolSetting(ctx context.Context, key string, value bool) error
	EnsureDefaultSettings(ctx context.Context) error
}

type SettingsPruner

type SettingsPruner interface {
	PruneUnknownSettings(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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