Documentation
¶
Overview ¶
Package cli implements the daemon and start commands for rallish.
Index ¶
- Variables
- func AddCmd() *cobra.Command
- func BootstrapCmd() *cobra.Command
- func BuildRegistry() (*adapter.Registry, error)
- func ConfigCmd() *cobra.Command
- func DoctorCmd() *cobra.Command
- func RallyCmd() *cobra.Command
- func RallyDoneCmd() *cobra.Command
- func RallyJoinCmd() *cobra.Command
- func RallyNewCmd() *cobra.Command
- func RallyStatusCmd() *cobra.Command
- func RunBootstrap(ctx context.Context, opts BootstrapOptions) error
- func RunConfigEdit(opts *ConfigOptions) error
- func RunConfigGet(opts *ConfigOptions, key string) error
- func RunConfigList(opts *ConfigOptions) error
- func RunConfigSet(opts *ConfigOptions, key, value string) error
- func RunDaemon(ctx context.Context, homeDir string, shutdown <-chan struct{}) error
- func RunDoctor(ctx context.Context, opts DoctorOptions) error
- func RunSquash(ctx context.Context, opts SquashOptions) error
- type AddOptions
- type BootstrapOptions
- type ConfigOptions
- type DoctorOptions
- type SquashOptions
Constants ¶
This section is empty.
Variables ¶
var ErrTimeoutWaitingForBaton = errors.New("rally join: timeout waiting for baton")
ErrTimeoutWaitingForBaton is returned by runRallyJoin when --timeout elapses before any baton event arrives. The top-level main maps this to exit code 2.
Functions ¶
func BootstrapCmd ¶ added in v0.3.0
BootstrapCmd returns the `bootstrap` cobra command.
func BuildRegistry ¶
BuildRegistry creates a registry with all available adapters.
func RallyDoneCmd ¶
RallyDoneCmd returns the `rally done` subcommand.
func RallyJoinCmd ¶
RallyJoinCmd returns the `rally join` subcommand.
func RallyNewCmd ¶
RallyNewCmd returns the `rally new` subcommand.
func RallyStatusCmd ¶
RallyStatusCmd returns the `rally status` subcommand.
func RunBootstrap ¶ added in v0.3.0
func RunBootstrap(ctx context.Context, opts BootstrapOptions) error
RunBootstrap is the executable entry point so tests can call it directly with an in-memory BootstrapOptions. The context is checked between steps so a Ctrl-C / SIGTERM cancellation exits cleanly without writing a partial config.
func RunConfigEdit ¶ added in v0.3.0
func RunConfigEdit(opts *ConfigOptions) error
RunConfigEdit opens the config file in $EDITOR, creating it (with defaults) if it doesn't exist yet.
func RunConfigGet ¶ added in v0.3.0
func RunConfigGet(opts *ConfigOptions, key string) error
RunConfigGet prints the resolved value for one key.
func RunConfigList ¶ added in v0.3.0
func RunConfigList(opts *ConfigOptions) error
RunConfigList is the executable entry point for `config list` so tests can call it directly with an in-memory ConfigOptions.
func RunConfigSet ¶ added in v0.3.0
func RunConfigSet(opts *ConfigOptions, key, value string) error
RunConfigSet writes a value and persists the file.
func RunDaemon ¶
RunDaemon starts the broker daemon. The caller is responsible for trapping signals and closing the shutdown channel to trigger a graceful stop; RunDaemon will then clean up its socket files.
Types ¶
type AddOptions ¶
type AddOptions struct {
Global bool
From string
Yes bool
// contains filtered or unexported fields
}
AddOptions holds flags for the add command.
type BootstrapOptions ¶ added in v0.3.0
type BootstrapOptions struct {
// Yes runs in non-interactive mode (CI-friendly). All prompts
// pick their default; the config file gets the built-in defaults.
Yes bool
// SkipSkill skips the skill-bundle install (useful when the user
// has already placed it under a different path).
SkipSkill bool
// SkipConfig skips the config-wizard step (still creates a
// defaults-only config file if none exists).
SkipConfig bool
// contains filtered or unexported fields
}
BootstrapOptions configures the bootstrap wizard.
type ConfigOptions ¶ added in v0.3.0
type ConfigOptions struct {
// contains filtered or unexported fields
}
ConfigOptions plumbs streams for unit tests.
type DoctorOptions ¶ added in v0.3.0
type DoctorOptions struct {
// contains filtered or unexported fields
}
DoctorOptions controls the human-facing `rallish doctor` view.