Documentation
¶
Overview ¶
Copyright © 2024 Matt Krueger <mkrueger@rstms.net>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- Constants
- func AddDaemonCommands(rootCmd *cobra.Command, args ...string)
- type CobraDaemon
- func NewDaemon(name, username, dir, command string, args ...string) (CobraDaemon, error)
- func NewDaemontools(name string, serviceUser *user.User, runDir string, command string, ...) (CobraDaemon, error)
- func NewRCDaemon(name string, daemonUser *user.User, runDir string, command string, ...) (CobraDaemon, error)
- func NewWindowsTask(taskName string, taskUser *user.User, taskDir string, taskCommand string, ...) (CobraDaemon, error)
- type Daemontools
- type RCDaemon
- type WindowsTask
Constants ¶
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
func AddDaemonCommands ¶ added in v0.0.4
Types ¶
type CobraDaemon ¶ added in v0.0.5
type CobraDaemon interface {
Install() error
Delete() error
Start() error
Stop() error
GetConfig() (string, error)
Query() (bool, error)
}
func NewDaemon ¶
func NewDaemon(name, username, dir, command string, args ...string) (CobraDaemon, error)
func NewDaemontools ¶
func NewRCDaemon ¶
func NewWindowsTask ¶
type Daemontools ¶
type Daemontools struct {
Name string
Username string
Uid string
Gid string
Executable string
Args string
Dir string
LogFile string
// contains filtered or unexported fields
}
func (*Daemontools) Delete ¶
func (d *Daemontools) Delete() error
func (*Daemontools) GetConfig ¶
func (d *Daemontools) GetConfig() (string, error)
func (*Daemontools) Install ¶
func (d *Daemontools) Install() error
func (*Daemontools) Query ¶
func (d *Daemontools) Query() (bool, error)
func (*Daemontools) Start ¶
func (d *Daemontools) Start() error
func (*Daemontools) Stop ¶
func (d *Daemontools) Stop() error
type RCDaemon ¶
type WindowsTask ¶
type WindowsTask struct {
Name string
Username string
Uid string
Executable string
Args string
Dir string
LogFile string
}
func (*WindowsTask) Delete ¶
func (t *WindowsTask) Delete() error
func (*WindowsTask) GetConfig ¶
func (t *WindowsTask) GetConfig() (string, error)
func (*WindowsTask) Install ¶
func (t *WindowsTask) Install() error
func (*WindowsTask) Query ¶
func (t *WindowsTask) Query() (bool, error)
func (*WindowsTask) Start ¶
func (t *WindowsTask) Start() error
func (*WindowsTask) Stop ¶
func (t *WindowsTask) Stop() error