service

package
v3.1.12+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 10 Imported by: 0

README

Location of details os log files. We do not normally need them, since we log to pinpoint specific log file anyway.

# Windows
- Open Event Viewer
- Windows Logs -> Application

# MacOS
cat ~/Library/LaunchAgents/SERVICE_NAME.plist
see StandardOutPath
cat /usr/local/var/log/SERVICE_NAME.out.log

# Alpine (openrc)
- /var/log/SERVICE_NAME.log 
- /var/log/SERVICE_NAME.err

# Ubuntu Bionic(docker) (service)
- /var/log/SERVICE_NAME.log 
- /var/log/SERVICE_NAME.err

Documentation

Index

Constants

View Source
const (
	Uninstall ControlAction = "uninstall"
	Start                   = "start"
	Stop                    = "stop"
	Restart                 = "restart"
	Status                  = "status"
)

Variables

View Source
var ErrUninstallExit = fmt.Errorf("uninstall exit")

ErrUninstallExit uninstall error

Functions

func Control

func Control(logger hclog.Logger, names Names, action ControlAction) error

func Install

func Install(logger hclog.Logger, names Names, runArgs []string) error

func Run

func Run(names Names, opts Opts, serviceFunc func(cancel chan bool) error)

func UninstallAndDelete

func UninstallAndDelete(opts UninstallOpts, pinpointRoot string) error

Types

type ControlAction

type ControlAction string

type Names

type Names struct {
	Name        string
	DisplayName string
	Description string
}

type Opts

type Opts struct {
	PinpointRoot string
}

type UninstallOpts

type UninstallOpts struct {
	PrintLog func(msg string, args ...interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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