Documentation
¶
Index ¶
- Constants
- type CreateSystemdService
- type CreateSystemdServiceImpl
- type MockCreateSystemdService
- type MockSystemdCreateUtils
- func (msc *MockSystemdCreateUtils) CreateDestinationAndCopy(binarySrcPath, binaryDestPath string) error
- func (msc *MockSystemdCreateUtils) ExecuteShellCommand(name string, arg []string) error
- func (msc *MockSystemdCreateUtils) GetBinaryPath() (string, error)
- func (msc *MockSystemdCreateUtils) GetEnv() string
- func (msc *MockSystemdCreateUtils) SystemdRunning() error
- type SystemdCreateUtils
- type SystemdCreateUtilsImpl
- func (scu *SystemdCreateUtilsImpl) CreateDestinationAndCopy(binarySrcPath, binaryDestPath string) error
- func (scu *SystemdCreateUtilsImpl) ExecuteShellCommand(name string, arg []string) error
- func (scu *SystemdCreateUtilsImpl) GetBinaryPath() (string, error)
- func (scu *SystemdCreateUtilsImpl) GetEnv() string
- func (scu *SystemdCreateUtilsImpl) SystemdRunning() error
Constants ¶
View Source
const ( INFO_LEVEL = "info" DEBUG_LEVEL = "debug" SERVICE_NAME = "automate-verify" SERVICE_DESCRIPTION = "Service for automating verification" SERVICE_COMMAND = "chef-automate verify serve" SYSTEMD_FILE = "%s.service" TEMPLATE_NAME = "systemd-service" TEMPLATE_TEXT = `` /* 234-byte string literal not displayed */ BINARY_FILE_NAME = "chef-automate" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateSystemdService ¶
type CreateSystemdService interface {
Create() error
}
func NewCreateSystemdService ¶
func NewCreateSystemdService( systemdCreateUtils SystemdCreateUtils, binaryDestinationFolder string, systemdLocation string, debug bool, writer *cli.Writer) (CreateSystemdService, error)
type CreateSystemdServiceImpl ¶
type CreateSystemdServiceImpl struct {
SystemdCreateUtils SystemdCreateUtils
BinaryDestinationFolder string
SystemdLocation string
Debug bool
Logger logger.Logger
Writer *cli.Writer
}
func (*CreateSystemdServiceImpl) Create ¶
func (css *CreateSystemdServiceImpl) Create() error
Create and start the systemd service for automate-verify if not exist. Else replace the existing service and restart it.
type MockCreateSystemdService ¶
type MockCreateSystemdService struct {
CreateFun func() error
}
func (*MockCreateSystemdService) Create ¶
func (m *MockCreateSystemdService) Create() error
type MockSystemdCreateUtils ¶
type MockSystemdCreateUtils struct {
GetBinaryPathFunc func() (string, error)
SystemdRunningFunc func() error
CreateDestinationAndCopyFunc func(binarySrcPath, binaryDestPath string) error
ExecuteShellCommandFunc func(name string, arg []string) error
GetEnvFunc func() string
}
func (*MockSystemdCreateUtils) CreateDestinationAndCopy ¶
func (msc *MockSystemdCreateUtils) CreateDestinationAndCopy(binarySrcPath, binaryDestPath string) error
func (*MockSystemdCreateUtils) ExecuteShellCommand ¶
func (msc *MockSystemdCreateUtils) ExecuteShellCommand(name string, arg []string) error
func (*MockSystemdCreateUtils) GetBinaryPath ¶
func (msc *MockSystemdCreateUtils) GetBinaryPath() (string, error)
func (*MockSystemdCreateUtils) GetEnv ¶
func (msc *MockSystemdCreateUtils) GetEnv() string
func (*MockSystemdCreateUtils) SystemdRunning ¶
func (msc *MockSystemdCreateUtils) SystemdRunning() error
type SystemdCreateUtils ¶
type SystemdCreateUtils interface {
GetBinaryPath() (string, error)
SystemdRunning() error
CreateDestinationAndCopy(binarySrcPath, binaryDestPath string) error
ExecuteShellCommand(name string, arg []string) error
GetEnv() string
}
func NewSystemdCreateUtilsImpl ¶
func NewSystemdCreateUtilsImpl() SystemdCreateUtils
type SystemdCreateUtilsImpl ¶
type SystemdCreateUtilsImpl struct{}
func (*SystemdCreateUtilsImpl) CreateDestinationAndCopy ¶
func (scu *SystemdCreateUtilsImpl) CreateDestinationAndCopy(binarySrcPath, binaryDestPath string) error
func (*SystemdCreateUtilsImpl) ExecuteShellCommand ¶
func (scu *SystemdCreateUtilsImpl) ExecuteShellCommand(name string, arg []string) error
func (*SystemdCreateUtilsImpl) GetBinaryPath ¶
func (scu *SystemdCreateUtilsImpl) GetBinaryPath() (string, error)
func (*SystemdCreateUtilsImpl) GetEnv ¶
func (scu *SystemdCreateUtilsImpl) GetEnv() string
func (*SystemdCreateUtilsImpl) SystemdRunning ¶
func (scu *SystemdCreateUtilsImpl) SystemdRunning() error
Click to show internal directories.
Click to hide internal directories.