command

package
v0.0.1-20230407-0004 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCmd

type AddCmd struct {
	//Callbacks
	// That's when daemon it's being called!
	OnDaemon CmdOnDaemon
	// That's when execution it's being called!
	OnExecute CmdOnExecute

	// That's when we enter Run Mode
	OnRun CmdOnRun
	// That's in create mode
	OnCreate         CmdOnCreate
	OnGetProcessName OnGetProcessName

	// Args -> are the input arguments received from the caller
	Args       []string
	ArgsPolicy string

	// This will be the process name based on what the lock will be made!
	ProcessName string
	// Command -> websocket:start
	Cmd string
	//Names
	ShortName string
	LongName  string
	Name      string

	// it will run the executable from its current location! ./APP
	RunDaemonFromExecDir bool

	// This enables startup services
	EnableStartupServices bool
	StartupCoreServices   StartupCoreServices

	Command *cobra.Command

	// should the process be locked!?
	LockProcess bool
	// Generate PID based on this Command!?
	GeneratePID bool
	// contains filtered or unexported fields
}

func NewCmd

func NewCmd() *AddCmd

func (*AddCmd) Destructor

func (c *AddCmd) Destructor()

func (*AddCmd) GenPID

func (c *AddCmd) GenPID() (bool, error)

func (*AddCmd) GetCancelFunc

func (c *AddCmd) GetCancelFunc() context.CancelFunc

func (*AddCmd) GetCmdLongName

func (c *AddCmd) GetCmdLongName() string

func (*AddCmd) GetCmdShortName

func (c *AddCmd) GetCmdShortName() string

func (*AddCmd) GetContext

func (c *AddCmd) GetContext() context.Context

func (*AddCmd) GetExistingPID

func (c *AddCmd) GetExistingPID() (string, error)

func (*AddCmd) GetProcessLockName

func (c *AddCmd) GetProcessLockName() string

func (*AddCmd) GetProcessName

func (c *AddCmd) GetProcessName() string

func (*AddCmd) PIDDestroy

func (c *AddCmd) PIDDestroy() (bool, error)

func (*AddCmd) SetCancelContext

func (c *AddCmd) SetCancelContext(ctx *_context.CancelCtx)

func (*AddCmd) StopProcess

func (c *AddCmd) StopProcess() (bool, error)

type CmdOnCreate

type CmdOnCreate func(*AddCmd)

type CmdOnDaemon

type CmdOnDaemon func(*AddCmd)

type CmdOnExecute

type CmdOnExecute func(cmd *AddCmd)

type CmdOnRun

type CmdOnRun func(*AddCmd)

type OnGetProcessName

type OnGetProcessName func(*AddCmd) string

type StartupCoreServices

type StartupCoreServices struct {
}

StartupCoreServices -> Here we add defined/core services, don't know how right is to do it here... but anyway...

Jump to

Keyboard shortcuts

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