Documentation ¶
Index ¶
- type FakeService
- func (ss *FakeService) Conf() common.Conf
- func (ss *FakeService) Exists() (bool, error)
- func (ss *FakeService) Install() error
- func (ss *FakeService) InstallCommands() ([]string, error)
- func (ss *FakeService) Installed() (bool, error)
- func (ss *FakeService) Name() string
- func (ss *FakeService) Remove() error
- func (ss *FakeService) Running() (bool, error)
- func (ss *FakeService) Start() error
- func (ss *FakeService) StartCommands() ([]string, error)
- func (ss *FakeService) Stop() error
- type FakeServiceData
- type ServiceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeService ¶
type FakeService struct { *FakeServiceData common.Service }
FakeService is a Service implementation for testing.
func NewFakeService ¶
func NewFakeService(name string, conf common.Conf) *FakeService
NewFakeService returns a new FakeService.
func (*FakeService) Exists ¶
func (ss *FakeService) Exists() (bool, error)
Exists implements Service.
func (*FakeService) InstallCommands ¶
func (ss *FakeService) InstallCommands() ([]string, error)
InstallCommands implements Service.
func (*FakeService) Installed ¶
func (ss *FakeService) Installed() (bool, error)
Installed implements Service.
func (*FakeService) Running ¶
func (ss *FakeService) Running() (bool, error)
Running implements Service.
func (*FakeService) StartCommands ¶
func (ss *FakeService) StartCommands() ([]string, error)
StartCommands implements Service.
type FakeServiceData ¶
FakeServiceData holds the results of Service method calls.
func NewFakeServiceData ¶
func NewFakeServiceData(names ...string) *FakeServiceData
NewFakeServiceData returns a new FakeServiceData.
func (*FakeServiceData) GetInstalled ¶
func (f *FakeServiceData) GetInstalled(name string) ServiceInfo
GetInstalled returns the installed service that matches name. If name is not found, the method panics.
func (*FakeServiceData) Installed ¶
func (f *FakeServiceData) Installed() []ServiceInfo
Installed returns a copy of the list of installed Services
func (*FakeServiceData) InstalledNames ¶
func (f *FakeServiceData) InstalledNames() []string
InstalledNames returns a copy of the list of the installed names.
func (*FakeServiceData) Removed ¶
func (f *FakeServiceData) Removed() []ServiceInfo
Removed returns a copy of the list of removed Services
func (*FakeServiceData) SetStatus ¶
func (f *FakeServiceData) SetStatus(name, status string) error
SetStatus updates the status of the named service.