cmdctrl

package module
v0.0.0-...-c771cbe Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

README

cmdctrl Build Status

This library will very likely change. It's built up on a few other components which you may want to use directly instead.

Documentation: https://godoc.org/github.com/facebookgo/cmdctrl

Documentation

Overview

Package cmdctrl provides standard startup logic for servers.

Index

Constants

This section is empty.

Variables

View Source
var CurrentProcessControl = ProcessControl(os.Getpid())

Provides ProcessControl for the current process.

Functions

func SimpleStart

func SimpleStart()

Simple Start is a os.Exiting version of the standard startup procedure. This provides simpler semantics and serves as an easy to use API for the standard case by automatically handling flag parsing, stop/restart/kill commands and only returning when the requested command was a "start" command.

Types

type ProcessControl

type ProcessControl int

Provides control over the process identified by the underlying pid.

func (ProcessControl) Kill

func (p ProcessControl) Kill() error

Send a signal to forcefully kill the server dropping all active connections.

func (ProcessControl) Restart

func (p ProcessControl) Restart() error

Send a signal to the process to gracefully restart.

func (ProcessControl) Stop

func (p ProcessControl) Stop() error

Send a signal to the process to gracefully stop.

Jump to

Keyboard shortcuts

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