CommandRegistry & CommandHandle
Bases: Generic[T]
Registry for stack commands.
Source code in orche/stack.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
build
property
Decorator for the 'build' command.
down
property
Decorator for the 'down' command.
rm
property
Decorator for the 'rm' command.
stop
property
Decorator for the 'stop' command.
up
property
Decorator for the 'up' command.
available_commands()
Return list of registered command names.
Source code in orche/stack.py
133 134 135 | |
get(name)
Get a registered command handler.
Source code in orche/stack.py
129 130 131 | |
get_after_hooks(name)
Return after-hooks for the given command.
Source code in orche/stack.py
145 146 147 | |
get_before_hooks(name)
Return before-hooks for the given command.
Source code in orche/stack.py
141 142 143 | |
hook_commands()
Return command names that have at least one hook.
Source code in orche/stack.py
137 138 139 | |
register(name)
Decorator to register a command.
Source code in orche/stack.py
100 101 102 | |
Bases: Generic[T]
A command slot with optional before/after hooks.
Source code in orche/stack.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
after
property
Decorator to register an after-hook for this command.
before
property
Decorator to register a before-hook for this command.
__call__(func)
Register func as the main handler (backward-compatible decorator).
The parameters of func define the command-line options it accepts.
Raises:
| Type | Description |
|---|---|
ConfigError
|
If a parameter has an unsupported type or a reserved name. |
Source code in orche/stack.py
59 60 61 62 63 64 65 66 67 68 69 | |