Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteShellCommand ¶
Types ¶
type DockerControl ¶
type DockerControl struct {
// contains filtered or unexported fields
}
DockerControl represents process control for a docker container
func (*DockerControl) Status ¶
func (dc *DockerControl) Status() bool
Status implements Process.Status
func (*DockerControl) UpdateStatus ¶
func (dc *DockerControl) UpdateStatus() bool
UpdateStatus implements Process.UpdateStatus
func (*DockerControl) WaitToBeDown ¶
func (dc *DockerControl) WaitToBeDown() bool
WaitToBeDown waits for the process status to be down by performing up check repeatedly for a certain duration
func (*DockerControl) WaitToComeUp ¶
func (dc *DockerControl) WaitToComeUp() bool
WaitToComeUp waits for the process status to be up by performing up check repeatedly for a certain duration
type Process ¶
type Process interface { // Start starts the process. it returns error if it fails. Start() error // Stop stops the process. it returns error if it fails. Stop() error // UpdateStatus performs a status check of the process, and caches the result before returning UpdateStatus() bool // Status returns the cached status Status() bool }
Process is an interface that represents blockchain client or privacy manager process It allows a process to be stopped & started. It allows the process's status to be checked. This should be used by node controller to control blockchain client, privacyManager.
type ShellProcessControl ¶
type ShellProcessControl struct {
// contains filtered or unexported fields
}
ShellProcessControl represents process control for a shell process
func (*ShellProcessControl) Start ¶
func (sp *ShellProcessControl) Start() error
Status implements Process.Start
func (*ShellProcessControl) Status ¶
func (sp *ShellProcessControl) Status() bool
Status implements Process.Status
func (*ShellProcessControl) Stop ¶
func (sp *ShellProcessControl) Stop() error
Status implements Process.Stop
func (*ShellProcessControl) UpdateStatus ¶
func (sp *ShellProcessControl) UpdateStatus() bool
UpdateStatus implements Process.UpdateStatus
func (*ShellProcessControl) WaitToBeDown ¶
func (sp *ShellProcessControl) WaitToBeDown() bool
TODO create helper that can be called from docker as well WaitToBeDown waits for the process status to be down by performing up check repeatedly for a certain duration
func (*ShellProcessControl) WaitToComeUp ¶
func (sp *ShellProcessControl) WaitToComeUp() bool
TODO create helper method that can be called from docker as well WaitToComeUp waits for the process status to be up by performing up check repeatedly for a certain duration