systemd

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionCmd

type ActionCmd struct {
	*root.RootCmd
	Servicer Servicer
	Action   string
}

func NewActionCmd

func NewActionCmd(rootCmd *root.RootCmd, servicer Servicer, action string) *ActionCmd

func (*ActionCmd) Exec

func (c *ActionCmd) Exec(ctx context.Context, fl *pflag.FlagSet) error

func (*ActionCmd) RegisterFlags

func (c *ActionCmd) RegisterFlags(fl *pflag.FlagSet)

func (*ActionCmd) Spec

func (c *ActionCmd) Spec() cmd.CmdSpec

type Service

type Service struct {
	Name        string
	Description string
	Command     string
	LogFile     string
	StdoutFile  string
}

func (*Service) RunAction

func (s *Service) RunAction(ctx context.Context, action string) error

func (*Service) Setup

func (s *Service) Setup(ctx context.Context) error

type Servicer

type Servicer interface {
	Service() Service
	Name() string
}

type SetupCmd

type SetupCmd struct {
	*root.RootCmd
	Servicer Servicer
}

func NewSetupCmd

func NewSetupCmd(rootCmd *root.RootCmd, servicer Servicer) *SetupCmd

func (*SetupCmd) Exec

func (c *SetupCmd) Exec(ctx context.Context, fl *pflag.FlagSet) error

func (*SetupCmd) RegisterFlags

func (c *SetupCmd) RegisterFlags(fl *pflag.FlagSet)

func (*SetupCmd) Spec

func (c *SetupCmd) Spec() cmd.CmdSpec

type SystemdCmd

type SystemdCmd struct {
	Servicer Servicer
	// contains filtered or unexported fields
}

SystemdCmd provides common subcommands for a systemd service. If you will provide your own subcommands, append to the `SystemdCmd.Subcommands()` list.

func NewSystemdCmd

func NewSystemdCmd(rootCmd *root.RootCmd, servicer Servicer) *SystemdCmd

func (*SystemdCmd) Subcommands

func (c *SystemdCmd) Subcommands() []cmd.ABFSCmd

type TailCmd

type TailCmd struct {
	*root.RootCmd
	Servicer Servicer
	// contains filtered or unexported fields
}

func NewTailCmd

func NewTailCmd(rootCmd *root.RootCmd, servicer Servicer) *TailCmd

func (*TailCmd) Exec

func (c *TailCmd) Exec(ctx context.Context, fl *pflag.FlagSet) error

func (*TailCmd) RegisterFlags

func (c *TailCmd) RegisterFlags(fl *pflag.FlagSet)

func (*TailCmd) Spec

func (c *TailCmd) Spec() cmd.CmdSpec

Jump to

Keyboard shortcuts

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