Documentation
¶
Index ¶
- Constants
- func Module(extends ...di.Node) di.Node
- func RegisterCommands(params registerParams) error
- func Run(nodes ...di.Node) di.Node
- func Use(name string, nodes ...di.Node) di.Node
- func UseBasicCommands() di.Node
- func WithDefaultName(name string) di.Node
- type Commander
- type HealthcheckCommand
- type HelpCommand
- type Root
- type VersionCommand
Constants ¶
View Source
const CommandersGroupName = "us/cmd/commanders"
Variables ¶
This section is empty.
Functions ¶
func Module ¶
Module wires root command creation and auto-registration for all Commander implementations.
func RegisterCommands ¶
func RegisterCommands(params registerParams) error
func Run ¶ added in v1.12.0
Serve is simply an alias for Use("serve", ...) This is the default command that is run when no command is provided.
func Use ¶
Use conditionally includes nodes for the selected CLI command. Selection is inferred from process args (defaults to "serve" when no command is provided). Nested commands are supported via prefix matching, for example: Use("user") matches "user list", and Use("user list") matches "user list active".
func UseBasicCommands ¶
func WithDefaultName ¶
WithDefaultName configures the default command used when no subcommand is provided.
Types ¶
type HealthcheckCommand ¶ added in v1.6.0
type HealthcheckCommand struct {
// contains filtered or unexported fields
}
func NewHealthcheckCommand ¶ added in v1.6.0
func NewHealthcheckCommand(shutdowner fx.Shutdowner) *HealthcheckCommand
func (*HealthcheckCommand) Command ¶ added in v1.6.0
func (s *HealthcheckCommand) Command() *cobra.Command
type HelpCommand ¶
type HelpCommand struct {
// contains filtered or unexported fields
}
func NewHelpCommand ¶
func NewHelpCommand(shutdowner fx.Shutdowner) *HelpCommand
func (*HelpCommand) Command ¶
func (s *HelpCommand) Command() *cobra.Command
type Root ¶
func (*Root) RegisterOne ¶
type VersionCommand ¶
type VersionCommand struct {
// contains filtered or unexported fields
}
func NewVersionCommand ¶
func NewVersionCommand(shutdowner fx.Shutdowner) *VersionCommand
func (*VersionCommand) Command ¶
func (s *VersionCommand) Command() *cobra.Command
Click to show internal directories.
Click to hide internal directories.