svcmanager

package
v0.56.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package svcmanager contains svcmanager implementations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service added in v0.52.0

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

Service struct for Service service manager

func NewService added in v0.52.0

func NewService(host *components.RemoteHost) *Service

NewService return service service manager

func (*Service) Restart added in v0.52.0

func (s *Service) Restart(service string) (string, error)

Restart executes restart command from service

func (*Service) Start added in v0.52.0

func (s *Service) Start(service string) (string, error)

Start executes start command from service

func (*Service) Status added in v0.52.0

func (s *Service) Status(service string) (string, error)

Status returns status from service

func (*Service) Stop added in v0.52.0

func (s *Service) Stop(service string) (string, error)

Stop executes stop command from service

type ServiceManager added in v0.52.0

type ServiceManager interface {
	Status(service string) (string, error)
	Start(service string) (string, error)
	Stop(service string) (string, error)
	Restart(service string) (string, error)
}

ServiceManager generic interface

type SystemCtl added in v0.52.0

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

SystemCtl struct for the Systemctl service manager

func NewSystemctl added in v0.52.0

func NewSystemctl(host *components.RemoteHost) *SystemCtl

NewSystemctl return systemctl service manager

func (*SystemCtl) Restart added in v0.52.0

func (s *SystemCtl) Restart(service string) (string, error)

Restart executes restart command from systemctl

func (*SystemCtl) Start added in v0.52.0

func (s *SystemCtl) Start(service string) (string, error)

Start executes start command from systemctl

func (*SystemCtl) Status added in v0.52.0

func (s *SystemCtl) Status(service string) (string, error)

Status returns status from systemctl

func (*SystemCtl) Stop added in v0.52.0

func (s *SystemCtl) Stop(service string) (string, error)

Stop executes stop command from stystemctl

type Upstart added in v0.52.0

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

Upstart is a service manager for upstart

func NewUpstart added in v0.52.0

func NewUpstart(host *components.RemoteHost) *Upstart

NewUpstart return upstart service manager

func (*Upstart) Restart added in v0.52.0

func (s *Upstart) Restart(service string) (string, error)

Restart executes restart command from upstart

func (*Upstart) Start added in v0.52.0

func (s *Upstart) Start(service string) (string, error)

Start executes start command from upstart

func (*Upstart) Status added in v0.52.0

func (s *Upstart) Status(service string) (string, error)

Status returns status from upstart

func (*Upstart) Stop added in v0.52.0

func (s *Upstart) Stop(service string) (string, error)

Stop executes stop command from upstart

type Windows added in v0.52.0

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

Windows struct for Windows service manager (SCM)

func NewWindows added in v0.52.0

func NewWindows(host *components.RemoteHost) *Windows

NewWindows returns Windows service manager

func (*Windows) Restart added in v0.52.0

func (s *Windows) Restart(service string) (string, error)

Restart executes restart command from service

func (*Windows) Start added in v0.52.0

func (s *Windows) Start(service string) (string, error)

Start executes start command from service

func (*Windows) Status added in v0.52.0

func (s *Windows) Status(service string) (string, error)

Status returns status from service

func (*Windows) Stop added in v0.52.0

func (s *Windows) Stop(service string) (string, error)

Stop executes stop command from service

Jump to

Keyboard shortcuts

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