daemon

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdInstall = &cobra.Command{
	Use:     "install",
	Short:   "Install the daemon server",
	Example: fmt.Sprintf("%s install", builder.Name),
	RunE: func(cmd *cobra.Command, args []string) error {
		str, err := srv.Install("server")
		if err != nil {
			return err
		}
		fmt.Println(str)
		return nil
	},
}
View Source
var CmdRemove = &cobra.Command{
	Use:     "remove",
	Short:   "Remove the daemon server",
	Example: fmt.Sprintf("%s remove", builder.Name),
	RunE: func(cmd *cobra.Command, args []string) error {
		str, err := srv.Remove()
		if err != nil {
			return err
		}
		fmt.Println(str)
		return nil
	},
}
View Source
var CmdServer = &cobra.Command{
	Use:          "server",
	Short:        "Start API server",
	Example:      fmt.Sprintf("%s server -c config.yaml", builder.Name),
	SilenceUsage: true,
	PreRun:       setup,
	RunE:         run,
	PostRun:      postRun,
}
View Source
var CmdStart = &cobra.Command{
	Use:     "start",
	Short:   "Start the daemon server",
	Example: fmt.Sprintf("%s start", builder.Name),
	RunE: func(cmd *cobra.Command, args []string) error {
		str, err := srv.Start()
		if err != nil {
			return err
		}
		fmt.Println(str)
		return nil
	},
}
View Source
var CmdStatus = &cobra.Command{
	Use:     "status",
	Short:   "Get the daemon server status",
	Example: fmt.Sprintf("%s status", builder.Name),
	RunE: func(cmd *cobra.Command, args []string) error {
		str, err := srv.Status()
		if err != nil {
			return err
		}
		fmt.Println(str)
		return nil
	},
}
View Source
var CmdStop = &cobra.Command{
	Use:     "stop",
	Short:   "Stop the daemon server",
	Example: fmt.Sprintf("%s stop", builder.Name),
	RunE: func(cmd *cobra.Command, args []string) error {
		str, err := srv.Stop()
		if err != nil {
			return err
		}
		fmt.Println(str)
		return nil
	},
}

Functions

This section is empty.

Types

type Executable

type Executable struct{}

func (Executable) Run

func (Executable) Run()

func (Executable) Start

func (Executable) Start()

func (Executable) Stop

func (Executable) Stop()

Jump to

Keyboard shortcuts

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