Documentation
¶
Index ¶
- Variables
- func CheckPrivileges() (bool, error)
- func CopyExecInOsDefault(execPath string) (newExecPath string, err error)
- func EraseData(serviceName string) (err error)
- func GetDefaultConfigPath(serviceName string) (dataDir string, err error)
- func GetDefaultExecPath(execPath string) (string, error)
- func GetExecutable(input string, serviceName string) (exec string, err error)
- func InstallSetup(serviceName string) (err error)
- func IsRunning(status string) bool
- func NewDaemon(name, description, execStartPath string, dependencies ...string) (d daemon.Daemon, err error)
- func RemoveProgramFiles(serviceName string) (err error)
- func UninstallSetup(serviceName string) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedSystem appears if try to use service on system which is not supported by this release ErrUnsupportedSystem = errors.New("unsupported system") // ErrRootPrivileges appears if run installation or deleting the service without root privileges ErrRootPrivileges = errors.New("you must have root user privileges. Possibly using 'sudo' command should help") // ErrExecNotFound provided executable file does not exists ErrExecNotFound = errors.New("executable file does not exists or not provided") // ErrServiceNotInstalled provided executable file does not exists ErrServiceNotInstalled = errors.New("Service is not installed") )
View Source
var UsageDet = fmt.Sprintf(`Config and log files are present in C:\ProgramData\Immudb folder`)
UsageDet details on config and log file on specific os
View Source
var UsageExamples = fmt.Sprintf(`Install the immutable database
immuadmin.exe service immudb install
Install the REST proxy client with rest interface. We discourage to install immugw in the same machine of immudb in order to respect the security model of our technology.
This kind of istallation is suggested only for testing purpose
immuadmin.exe service immugw install
It's possible to provide a specific executable
immuadmin.exe service immudb install --local-file immudb.exe
Uninstall immudb after 20 second
immuadmin.exe service immudb uninstall --time 20
`)
UsageExamples examples
Functions ¶
func CheckPrivileges ¶
func CopyExecInOsDefault ¶
todo @Michele use functions from the fs package? CopyExecInOsDefault copy the executable in default exec folder and returns the path
func GetDefaultConfigPath ¶
GetDefaultConfigPath returns the default config path
func GetDefaultExecPath ¶
GetDefaultExecPath returns the default exec path
func GetExecutable ¶
GetExecutable looks for the service executable name provided or try to use an executable presents in current folder. It returns the absolute file path
func InstallSetup ¶
func RemoveProgramFiles ¶
RemoveProgramFiles remove all program files
func UninstallSetup ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.