pmgo

command module
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 13 Imported by: 0

README

PMGO

PMGO is a lightweight process manager written in Golang for Golang applications. It helps you keep your applications alive forever, reload and start them from the source code.

Change log

Change log

Install pmgo

$ go get github.com/struCoder/pmgo
$ mv $GOPATH/bin/pmgo /usr/local/bin

Or

curl https://raw.githubusercontent.com/struCoder/pmgo/master/install.sh | sh

Starting a new application

If it's the first time you are starting a new golang application, you need to tell pmgo to first build its binary. Then you need to first run:

$ pmgo start source app-name

This will automatically compile, start and daemonize your application. If you need to later on, stop, restart or delete your app from PMGO, you can just run normal commands using the app-name you specified. Example:

$ pmgo stop app-name
$ pmgo restart app-name
$ pmgo delete app-name

Main features

Commands overview
$ pmgo kill                                                  # kill pmgo daemon process

$ pmgo start source app-name                                 # Compile, start, daemonize and auto  restart application.
$ pmgo restart app-name                                      # Restart a previously saved process
$ pmgo stop app-name                                         # Stop application.
$ pmgo delete app-name                                       # Delete application forever.

$ pmgo save                                                  # Save current process list

$ pmgo list                                                  # Display status for each app.
$ pmgo info app-name                                         # describe importance parameters of a process name
Demo

demo

I Love This. How do I Help?
  • Simply star this repository :-)
  • Help us spread the world on Facebook and Twitter
  • Contribute Code!
  • I'll be very grateful if you'd like to donate to encourage me to continue maintaining pmgo.
Donate
Paypal

paypal

alipay(zhifubao)

alipay

Documentation

Overview

PMGO 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.

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

The main PMGO 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 PMGO, take a look at RemoteMaster on Master package.

To use the remote version of PMGO, 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