apm

command module
v0.0.2-0...-fb2a9cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2016 License: MIT Imports: 11 Imported by: 0

README


A(guia) P(rocess) M(anager)

# APM - Aguia Process Manager APM is a lightweight process manager written in Golang for Golang applications. It helps you keep your applications alive forever, to reload and start them from the source code.

ReportCard GoDoc

Starting an application is easy:

$ ./apm bin app-name --source="github.com/topfreegames/apm"

This will basically compile your project source code and start it as a daemon in the background.

Install APM

$ go get github.com/topfreegames/apm

Start APM

$ apm serve

If not config file is provided, it will default to a folder '.apmenv' where apm is first started.

Stop APM

$ apm serve-stop

Main features

Commands overview

$ apm serve --config-file="config/file/path.toml"
$ apm serve-stop --config-file="config/file/path.toml"

$ apm bin app-name --source="github.com/topfreegames/apm"   # Compile, start, daemonize and auto restart application.
$ apm start app-name                                        # Start, daemonize and auto restart application.
$ apm restart app-name                                      # Restart a previously saved process
$ apm stop app-name                                         # Stop application.
$ apm delete app-name                                       # Delete application forever.

$ apm save                                                  # Save current process list
$ apm resurrect                                             # Restore previously saved processes

$ apm status                                                # Display status for each app.

### Managing process via HTTP

You can also use all of the above commands via HTTP requests. Just set the flag ```--dns``` together with ```./apm serve``` and then you can use a remote client to start, stop, delete and query status for each app. 

Documentation

Overview

APM is a lightweight process manager written in Golang for Golang applications. It helps you keep all of your applications alive forever, if you want to. You can also reload, start, stop, delete and query status on the fly.

APM also provide a way to start a process by compiling a Golang project source code.

The main APM module is the Master module, it's the glue that keep everything running as it should be.

If you need to use the remote version of APM, take a look at RemoteMaster on Master package.

To use the remote version of APM, use:

- remoteServer := master.StartRemoteMasterServer(dsn, configFile)

It will start a remote master and return the instance.

To make remote requests, use the Remote Client by instantiating using:

- remoteClient, err := master.StartRemoteClient(dsn, timeout)

It will start the remote client and return the instance so you can use to initiate requests, such as:

- remoteClient.StartGoBin(sourcePath, name, keepAlive, args)

Directories

Path Synopsis
lib
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL