forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
service_nix.go
59 lines (47 loc) · 1.37 KB
/
service_nix.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright 2015 Canonical Ltd.
// Copyright 2015 Cloudbase Solutions
// Licensed under the AGPLv3, see LICENCE file for details.
//
// +build !windows
package windows
import (
"github.com/juju/juju/service/common"
)
// SvcManager implements ServiceManager interface
type SvcManager struct{}
// Start starts a service.
func (s *SvcManager) Start(name string) error {
return nil
}
// Stop stops a service.
func (s *SvcManager) Stop(name string) error {
return nil
}
// Delete deletes a service.
func (s *SvcManager) Delete(name string) error {
return nil
}
// Create creates a service with the given config.
func (s *SvcManager) Create(name string, conf common.Conf) error {
return nil
}
// Running returns the status of a service.
func (s *SvcManager) Running(name string) (bool, error) {
return false, nil
}
// Exists checks whether the config of the installed service matches the
// config supplied to this function
func (s *SvcManager) Exists(name string, conf common.Conf) (bool, error) {
return false, nil
}
// ChangeServicePassword can change the password of a service
// as long as it belongs to the user defined in this package
func (s *SvcManager) ChangeServicePassword(name, newPassword string) error {
return nil
}
var listServices = func() ([]string, error) {
return []string{}, nil
}
var NewServiceManager = func() (ServiceManager, error) {
return &SvcManager{}, nil
}