Documentation
¶
Index ¶
- func CommandString(framework string, action LifecycleAction) string
- func Execute(ctx context.Context, framework string, action LifecycleAction) error
- func ExecuteWithConfig(ctx context.Context, framework, configPath string, action LifecycleAction) error
- func ExecuteWithConfigEnv(ctx context.Context, framework, configPath string, action LifecycleAction, ...) error
- type LifecycleAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandString ¶
func CommandString(framework string, action LifecycleAction) string
CommandString returns a human-readable version of the command that would run.
func Execute ¶
func Execute(ctx context.Context, framework string, action LifecycleAction) error
Execute runs a lifecycle action for the given framework. It checks whether the OS service is installed first and adapts the command accordingly.
func ExecuteWithConfig ¶
func ExecuteWithConfig(ctx context.Context, framework, configPath string, action LifecycleAction) error
ExecuteWithConfig runs a lifecycle action for a framework using a specific config path. This is used for provisioned instances that have their own config files.
func ExecuteWithConfigEnv ¶
func ExecuteWithConfigEnv(ctx context.Context, framework, configPath string, action LifecycleAction, extraEnv []string) error
ExecuteWithConfigEnv runs a lifecycle action for a framework using a specific config path, with extra environment variables appended. Starts from config.EnrichedEnv() (which itself extends os.Environ() with tool-directory PATH entries for cargo/go/npm/etc) via mergeEnv, then appends extraEnv — never replaces the full environment. This is the primary entry point when vault env vars need injection.
Types ¶
type LifecycleAction ¶
type LifecycleAction string
const ( ActionStart LifecycleAction = "start" ActionStop LifecycleAction = "stop" ActionRestart LifecycleAction = "restart" )