pm2

package
v0.2.105 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

README

PM2

PM2 is a Node controller.

Manage, Maintain and Increase Node.js Performance. We maintain the most widely used Process Manager for Node.js counting over 100 millions downloads.

https://pm2.io/

npm install pm2 -g

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pm2Exec

type Pm2Exec struct {
	// contains filtered or unexported fields
}

func NewExec

func NewExec(execPath string, logger gg_log.ILogger) *Pm2Exec

func (*Pm2Exec) Delete

func (instance *Pm2Exec) Delete(uid string) (response string, err error)

Delete deletes a process identified by the given uid or all processes if uid is empty. It ensures the necessary program is installed before attempting deletion.

func (*Pm2Exec) ExecuteCommand

func (instance *Pm2Exec) ExecuteCommand(arguments ...string) (out string, err error)

func (*Pm2Exec) GetPath

func (instance *Pm2Exec) GetPath(path string) (response string)

func (*Pm2Exec) GetTempPath

func (instance *Pm2Exec) GetTempPath(subPath string) (response string)

func (*Pm2Exec) GetWorkPath

func (instance *Pm2Exec) GetWorkPath(subPath string) (response string)

func (*Pm2Exec) Help

func (instance *Pm2Exec) Help() (string, error)

func (*Pm2Exec) HelpOn

func (instance *Pm2Exec) HelpOn(command string) (string, error)

func (*Pm2Exec) Install

func (instance *Pm2Exec) Install() (response string, err error)

func (*Pm2Exec) IsInstalled

func (instance *Pm2Exec) IsInstalled() bool

func (*Pm2Exec) List

func (instance *Pm2Exec) List() (string, error)

func (*Pm2Exec) LogDisableRotation

func (instance *Pm2Exec) LogDisableRotation()

func (*Pm2Exec) LogFlush

func (instance *Pm2Exec) LogFlush()

func (*Pm2Exec) Root

func (instance *Pm2Exec) Root() string

func (*Pm2Exec) Run

func (instance *Pm2Exec) Run(command string) (string, error)

func (*Pm2Exec) RunAsync

func (instance *Pm2Exec) RunAsync(command string) (*executor.ConsoleProgramSession, error)

func (*Pm2Exec) SetLogger

func (instance *Pm2Exec) SetLogger(logger gg_log.ILogger) *Pm2Exec

func (*Pm2Exec) SetRoot

func (instance *Pm2Exec) SetRoot(dir string) *Pm2Exec

func (*Pm2Exec) SetSubTemp

func (instance *Pm2Exec) SetSubTemp(enabled bool) *Pm2Exec

func (*Pm2Exec) SetTemp

func (instance *Pm2Exec) SetTemp(dir string) *Pm2Exec

func (*Pm2Exec) SetWorkPath

func (instance *Pm2Exec) SetWorkPath(dir string) *Pm2Exec

func (*Pm2Exec) Start

func (instance *Pm2Exec) Start(indexPath string, watchEnabled bool) (response string, err error)

Start initializes the NpmExec instance with the given indexPath, setting root and work paths, then verifies installation. If the required environments are not installed, it proceeds with installation and starts the node program using pm2.

func (*Pm2Exec) Stop

func (instance *Pm2Exec) Stop(uid string) (response string, err error)

Stop stops the npm process for the given unique identifier (uid) or stops all if uid is empty.

func (*Pm2Exec) Temp

func (instance *Pm2Exec) Temp() string

func (*Pm2Exec) Version

func (instance *Pm2Exec) Version() (string, error)

func (*Pm2Exec) Work

func (instance *Pm2Exec) Work() string

type Pm2Helper

type Pm2Helper struct {
}
var (
	Pm2 *Pm2Helper
)

func (*Pm2Helper) IsInstalled

func (instance *Pm2Helper) IsInstalled() bool

func (*Pm2Helper) NewExec

func (instance *Pm2Helper) NewExec() *Pm2Exec

NewExec Creates new pm2 command

func (*Pm2Helper) Version

func (instance *Pm2Helper) Version() (version string, err error)

Jump to

Keyboard shortcuts

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