service

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 6 Imported by: 0

README

About service

This is a very simple package I use for supporting service daemons. It can be optionally use systemd on GNU/Linux systems if the systemd build tag is applied, and it supports generic service daemon execution on non-SystemD systems, including other (BSD) generic posix platforms. It provides interfaces for both accessing service features and logging. No specific service functionality is currently offered or planned for Microsoft Windows.

Dependencies

Service is a Go module that requires Go 1.19 or later and can be installed from an import of tychosoft.com/tychosoft/service. To use systemd, the build tag must be specified in the service application, and it will then build systemd support from github.com/coreos/go-systemd. Our applications automatically vendor these as external dependencies and do not require remote access to use.

Participation

This project is offered as free (as in freedom) software for public use and has a public home page at https://www.tychosoft.com/tychosoft/service which has an issue tracker where people can submit public bug reports, and a wiki for hosting project documentation. Because of the broken way importing works in Go you cannot easily relocate packages, and we directly host the repo publically. Patches may be submitted and attached to an issue in the issue tracker. Support requests and other kinds of inquiries may also be sent privately thru email to tychosoft@gmail.com. Other details about participation may be found in the Contributing page.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(level int, args ...interface{})

func Error

func Error(args ...interface{})

Log errors

func Fail

func Fail(code int, args ...interface{})

Log failure and exit

func Info

func Info(args ...interface{})

Log info

func IsDebug

func IsDebug() bool

func Live

func Live(args ...interface{}) error

func Logger

func Logger(level int, path string)

func LoggerRestart

func LoggerRestart()

Reset Logger such as from sighup

func Notice

func Notice(args ...interface{})

Log notices

func Output

func Output(level int, args ...interface{})

Verbose output

func Reload

func Reload(args ...interface{}) error

func Status

func Status(string) error

func Stop

func Stop(args ...interface{}) error

func Warn

func Warn(args ...interface{})

Log warnings

func Watchdog

func Watchdog() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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