Documentation
¶
Overview ¶
Package cli implements the command-line interface for ccrouter.
Package cli implements the command-line interface.
Index ¶
- Variables
- func Execute()
- func NewCleanCommand() *cobra.Command
- func NewCodeCommand() *cobra.Command
- func NewConfigCommand() *cobra.Command
- func NewLogsCommand() *cobra.Command
- func NewMonitorCommand() *cobra.Command
- func NewProfileCommand() *cobra.Command
- func NewProfileListCommand() *cobra.Command
- func NewProfileStatusCommand() *cobra.Command
- func NewProfileSwitchCommand() *cobra.Command
- func NewRestartCommand() *cobra.Command
- func NewRootCommand() *cobra.Command
- func NewStartCommand() *cobra.Command
- func NewStatusCommand() *cobra.Command
- func NewStopCommand() *cobra.Command
- type RegistryAdapter
- type RouterAdapter
Constants ¶
This section is empty.
Variables ¶
var Version = "0.1.0"
Version is the application version.
Functions ¶
func NewCleanCommand ¶
NewCleanCommand creates the clean command.
func NewConfigCommand ¶
NewConfigCommand creates the config command - launches the TUI wizard.
func NewMonitorCommand ¶
NewMonitorCommand creates the monitor command
func NewProfileCommand ¶
NewProfileCommand creates the profile command group.
func NewProfileListCommand ¶
NewProfileListCommand lists available profiles.
func NewProfileStatusCommand ¶
NewProfileStatusCommand shows current profile status.
func NewProfileSwitchCommand ¶
NewProfileSwitchCommand switches active profile.
func NewRestartCommand ¶
NewRestartCommand creates the restart command.
func NewStartCommand ¶
NewStartCommand creates the start command.
func NewStatusCommand ¶
NewStatusCommand creates the status command.
Types ¶
type RegistryAdapter ¶
type RegistryAdapter struct {
// contains filtered or unexported fields
}
RegistryAdapter adapts transformer.Registry to proxy.TransformerRegistry interface.
func NewRegistryAdapter ¶
func NewRegistryAdapter(registry *transformer.Registry) *RegistryAdapter
NewRegistryAdapter creates a new registry adapter.
func (*RegistryAdapter) Get ¶
func (a *RegistryAdapter) Get(name string) (transformer.Transformer, error)
Get implements proxy.TransformerRegistry.
type RouterAdapter ¶
type RouterAdapter struct {
// contains filtered or unexported fields
}
RouterAdapter adapts router.Engine to proxy.Router interface.
func NewRouterAdapter ¶
func NewRouterAdapter(engine *router.Engine) *RouterAdapter
NewRouterAdapter creates a new router adapter.
func (*RouterAdapter) DetectRoute ¶
func (a *RouterAdapter) DetectRoute(req router.RouteRequest) string
DetectRoute implements proxy.Router.
func (*RouterAdapter) GetTargets ¶
func (a *RouterAdapter) GetTargets(routeName string) []config.RouteTarget
GetTargets implements proxy.Router.
func (*RouterAdapter) SetActiveProfile ¶
func (a *RouterAdapter) SetActiveProfile(profile string)
SetActiveProfile implements proxy.Router.