service

package
v0.1.0-dev.20260216221814 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *execution.ActionRegistry)

Register registers all service actions with the given registry.

Types

type Disable

type Disable struct{ Impl *Provider }

Disable disables a service from starting at boot.

func (*Disable) Do

func (*Disable) Name

func (o *Disable) Name() string

func (*Disable) Undo

func (o *Disable) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

type Enable

type Enable struct{ Impl *Provider }

Enable enables a service to start at boot.

func (*Enable) Do

func (*Enable) Name

func (o *Enable) Name() string

func (*Enable) Undo

func (o *Enable) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

type Provider

type Provider struct{}

Provider provides platform-agnostic service management. Platform detection happens at runtime — callers don't need to know whether launchd, systemd, or Windows services are being used.

func (*Provider) Disable

func (p *Provider) Disable(name string, output io.Writer) error

Disable disables a service from starting at boot.

func (*Provider) Enable

func (p *Provider) Enable(name string, output io.Writer) error

Enable enables a service to start at boot.

func (*Provider) Restart

func (p *Provider) Restart(name string, output io.Writer) error

Restart restarts a service.

func (*Provider) Start

func (p *Provider) Start(name string, output io.Writer) error

Start starts a service.

func (*Provider) Stop

func (p *Provider) Stop(name string, output io.Writer) error

Stop stops a service.

type Restart

type Restart struct{ Impl *Provider }

Restart restarts a service.

func (*Restart) Do

func (*Restart) Name

func (o *Restart) Name() string

func (*Restart) Undo

func (o *Restart) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

type Start

type Start struct{ Impl *Provider }

Start starts a service.

func (*Start) Do

func (*Start) Name

func (o *Start) Name() string

func (*Start) Undo

func (o *Start) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

type Stop

type Stop struct{ Impl *Provider }

Stop stops a service.

func (*Stop) Do

func (o *Stop) Do(ctx *execution.Context, slots map[string]any) (execution.Result, execution.UndoState, error)

func (*Stop) Name

func (o *Stop) Name() string

func (*Stop) Undo

func (o *Stop) Undo(_ *execution.Context, _ map[string]any, _ execution.UndoState) error

Jump to

Keyboard shortcuts

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