Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandFunc ¶
CommandFunc takes a function and wraps into a type which implements the commander interface.
Types ¶
type InstallCommand ¶
type InstallCommand struct { RootCommand ExePath string `long:"executable" short:"x" description:"Full path to the executable" required:"true"` WorkDir string `` /* 130-byte string literal not displayed */ Name string `long:"name" short:"n" description:"Name of the service, if not specified name of the executable is used."` DisplayName string `long:"display-name" short:"i" description:"Display name of the service, if not specified name of the executable is used."` Desc string `long:"desc" short:"d" description:"Description of the service"` Args []string `` /* 130-byte string literal not displayed */ Env []string `` /* 130-byte string literal not displayed */ }
InstallCommand used to install a binary as service.
func (*InstallCommand) Execute ¶
func (i *InstallCommand) Execute(args []string) (err error)
Execute will install a binary as service. The args parameter is not used and is only to fullfil the go-flags commander interface.
type RemoveCommand ¶
type RemoveCommand struct { RootCommand Name string `long:"name" short:"n" description:"Try to remove service by name"` }
RemoveCommand used to remove a service.
func (*RemoveCommand) Execute ¶
func (r *RemoveCommand) Execute(args []string) error
Execute will remove an installed service. The args parameter is not used and is only to fullfil the go-flags commander interface.
type RootCommand ¶
type RootCommand struct {
Verbose bool `long:"verbose" short:"v" description:"Verbose output"`
}
RootCommand used for all subcommands
type RunCommand ¶
type RunCommand struct {
RootCommand
}
RunCommand runs the configured service directly.
func (*RunCommand) Execute ¶
func (r *RunCommand) Execute(args []string) (err error)
Execute will run the service handler.
type SvcConfig ¶
type SvcConfig struct { Name string `json:"name,omitempty"` ExePath string `json:"exe_path,omitempty"` WorkDir string `json:"work_dir,omitempty"` Args []string `json:"args,omitempty"` Env []string `json:"env,omitempty"` WaitTimeout int `json:"wait_timeout,omitempty"` }
SvcConfig is the data required run the executable as a service.
Click to show internal directories.
Click to hide internal directories.