pgctl package¶
Submodules¶
pgctl.cli module¶
-
class
pgctl.cli.PgctlApp(config=<frozendict {u'services': (u'default', ), u'pgdir': u'playground', u'pgconf': u'conf.yaml', u'pghome': u'~/.run/pgctl'}>)¶ Bases:
object-
aliases¶ A dictionary of aliases that can be expanded to services
-
all_services¶ Return a tuple of all of the Services.
Returns: tuple of Service objects
-
app_invariants()¶ The are the things we want to be able to say “always” about.
-
commands= (<function start at 0x7f93b93fd8c0>, <function stop at 0x7f93b93fd938>, <function status at 0x7f93b93fda28>, <function restart at 0x7f93b93fdaa0>, <function reload at 0x7f93b93fdb18>, <function log at 0x7f93b93fdb90>, <function debug at 0x7f93b93fdc08>, <function config at 0x7f93b93fdc80>)¶
-
config()¶ Print the configuration for a service
-
debug()¶ Allow a service to run in the foreground
-
idempotent_supervise()¶ ensure all services are supervised starting in a down state by contract, running this method repeatedly should have no negative consequences
-
log()¶ Displays the stdout and stderr for a service or group of services
-
pgdir¶ Retrieve the set playground directory
-
pghome¶ Retrieve the set pgctl home directory.
By default, this is “$XDG_RUNTIME_DIR/pgctl”.
-
reload()¶ Reloads the configuration for a service
-
restart()¶ Starts and stops a service
-
service_by_name(service_name)¶ Return an instantiated Service, by name.
-
service_names¶
-
services¶ Return a tuple of the services for a command
Returns: tuple of Service objects
-
services_string¶
-
start()¶ Idempotent start of a service or group of services
-
status()¶ Retrieve the PID and state of a service or group of services
-
stop()¶ Idempotent stop of a service or group of services
-
unsupervise()¶
-
-
pgctl.cli.exec_(argv, env=None)¶ Wrapper to os.execv which runs any atexit handlers (for coverage’s sake). Like os.execv, this function never returns.
-
pgctl.cli.main(argv=None)¶
-
pgctl.cli.parser()¶