Documentation ¶
Index ¶
- type CleanupFunc
- type Conn
- func (c *Conn) DisableUnit(ctx context.Context, unitName string) error
- func (c *Conn) EnableUnit(ctx context.Context, unitName string) error
- func (c *Conn) ListUnits(ctx context.Context) ([]Unit, error)
- func (c *Conn) ReloadUnit(ctx context.Context, unitName string) error
- func (c *Conn) RestartUnit(ctx context.Context, unitName string) error
- func (c *Conn) StartUnit(ctx context.Context, unitName string) error
- func (c *Conn) StopUnit(ctx context.Context, unitName string) error
- type Service
- type ServiceConfig
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupFunc ¶
type CleanupFunc func()
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn represents a systemd dbus connection
func (*Conn) DisableUnit ¶
DisableUnit disables a systemd unit
func (*Conn) EnableUnit ¶
EnableUnit enables a systemd unit
func (*Conn) ReloadUnit ¶
ReloadUnit reloads a systemd unit
func (*Conn) RestartUnit ¶
RestartUnit restarts a systemd unit
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a single running systemd unit. The unit is kept alive until Stop is called.
func NewService ¶
func NewService(parentContext context.Context, conf *ServiceConfig) (*Service, error)
NewService creates a new Service
type ServiceConfig ¶
type ServiceConfig struct { Config []byte ConfigPath string UnitName string Cleanup CleanupFunc }
ServiceConfig represents config for a systemd service
Click to show internal directories.
Click to hide internal directories.