daemon

package
v0.11.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package daemon provides facilities for daemon operation.

Index

Constants

View Source
const RegistrationSupported = false

RegistrationSupported indicates whether or not daemon registration is supported on this platform.

Variables

View Source
var AutostartDisabled bool

AutostartDisabled controls whether or not daemon autostart is disabled for Mutagen. It is set automatically based on the MUTAGEN_DISABLE_AUTOSTART environment variable.

Functions

func EndpointPath added in v0.10.0

func EndpointPath() (string, error)

EndpointPath computes the path to the daemon IPC endpoint, creating any intermediate directories as necessary.

func Register

func Register() error

Register performs automatic daemon startup registration.

func RegisteredStart

func RegisteredStart() (bool, error)

RegisteredStart potentially handles daemon start operations if the daemon is registered for automatic start with the system. It returns false if the start operation was not handled and should be handled by the normal start command.

func RegisteredStop

func RegisteredStop() (bool, error)

RegisteredStop potentially handles stop start operations if the daemon is registered for automatic start with the system. It returns false if the stop operation was not handled and should be handled by the normal stop command.

func Unregister

func Unregister() error

Unregister performs automatic daemon startup de-registration.

Types

type Lock

type Lock struct {
	// contains filtered or unexported fields
}

Lock represents the global daemon lock. It is held by a single daemon instance at a time.

func AcquireLock

func AcquireLock() (*Lock, error)

AcquireLock attempts to acquire the global daemon lock.

func (*Lock) Release added in v0.10.0

func (l *Lock) Release() error

Release releases the daemon lock.

Jump to

Keyboard shortcuts

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