launchd

package
v0.0.0-...-ab8191b Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Domain

func Domain(scope god.Scope) (string, error)

func Name

func Name(opts god.Options) (string, error)

func New

func New(ctx context.Context, opts god.Options) (god.Unit, error)

New creates a new Unit.

func Path

func Path(scope god.Scope, filename string) (string, error)

func Scope

func Scope(opts god.Options) (god.Scope, error)

func Username

func Username(opts god.Options) (string, error)

Types

type ExecError

type ExecError struct {
	UnderlyingError error
	Command         []string
	Stderr          string
}

func (*ExecError) Error

func (err *ExecError) Error() string

func (*ExecError) Is

func (err *ExecError) Is(err2 error) bool

func (*ExecError) IsBetterWithSudo

func (err *ExecError) IsBetterWithSudo() bool

func (*ExecError) MatchBadRequestRegex

func (err *ExecError) MatchBadRequestRegex(reason *regexp.Regexp) bool

func (*ExecError) MatchLaunchdReason

func (err *ExecError) MatchLaunchdReason(reason string) bool

func (*ExecError) Unwrap

func (err *ExecError) Unwrap() error

type Unit

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

func (*Unit) Create

func (u *Unit) Create(ctx context.Context) error

func (*Unit) Delete

func (u *Unit) Delete(ctx context.Context) error

func (*Unit) Disable

func (u *Unit) Disable(ctx context.Context) error

func (*Unit) Enable

func (u *Unit) Enable(ctx context.Context) error

func (*Unit) Status

func (u *Unit) Status(ctx context.Context) (god.UnitStatus, error)

Status returns the status of the unit. Carefull, this rely on launchctl output which is not stable API yet.

func (*Unit) ToPlist

func (u *Unit) ToPlist(writer io.Writer) error

Jump to

Keyboard shortcuts

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