service

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package service installs the agent as a system service: a systemd unit on Linux, a launchd daemon on macOS, a Windows service elsewhere.

Index

Constants

View Source
const (
	// Name identifies the service to systemd and the Windows SCM.
	Name = "transporter"
	// DisplayName is shown in service managers.
	DisplayName = "Transporter mesh agent"
	// LaunchdLabel identifies the macOS launch daemon.
	LaunchdLabel = "com.transporter.agent"
)

Variables

This section is empty.

Functions

func Install

func Install(c Config) error

Install writes and starts the systemd unit.

func LaunchdPlist

func LaunchdPlist(c Config) string

LaunchdPlist renders the launch daemon property list.

func Supported

func Supported() bool

Supported reports whether service installation works on this OS.

func SystemdUnit

func SystemdUnit(c Config) string

SystemdUnit renders the systemd unit file.

func Uninstall

func Uninstall() error

Uninstall stops and removes the systemd unit.

Types

type Config

type Config struct {
	// Exe is the absolute path of the transporter binary.
	Exe string
	// Args follow the binary, starting with "up". They must not contain
	// secrets: the node is enrolled before the service is installed.
	Args []string
}

Config describes the service to install.

Jump to

Keyboard shortcuts

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