Documentation ¶
Overview ¶
Package child_process contains common utilities for running NordVPN helper apps(eg. fileshare and norduser) as a child process, rather than a system daemon.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildProcessManager ¶
type ChildProcessManager interface { // StartProcess starts the fileshare process StartProcess() (StartupErrorCode, error) // StopProcess stops the fileshare process StopProcess(disable bool) error // ProcessStatus checks the status of fileshare process ProcessStatus() ProcessStatus }
type GRPCChildProcessManager ¶
type GRPCChildProcessManager struct {
// contains filtered or unexported fields
}
func NewGRPCChildProcessManager ¶
func NewGRPCChildProcessManager(processClient ProcessClient, processBinaryPath string) *GRPCChildProcessManager
func (*GRPCChildProcessManager) ProcessStatus ¶
func (g *GRPCChildProcessManager) ProcessStatus() ProcessStatus
func (*GRPCChildProcessManager) StartProcess ¶
func (g *GRPCChildProcessManager) StartProcess() (StartupErrorCode, error)
func (*GRPCChildProcessManager) StopProcess ¶
func (g *GRPCChildProcessManager) StopProcess(disable bool) error
type NoopChildProcessManager ¶
type NoopChildProcessManager struct{}
func (NoopChildProcessManager) ProcessStatus ¶
func (c NoopChildProcessManager) ProcessStatus() ProcessStatus
func (NoopChildProcessManager) StartProcess ¶
func (c NoopChildProcessManager) StartProcess() (StartupErrorCode, error)
func (NoopChildProcessManager) StopProcess ¶
func (c NoopChildProcessManager) StopProcess(bool) error
type ProcessClient ¶
type ProcessStatus ¶
type ProcessStatus int
const ( Running ProcessStatus = iota RunningForOtherUser NotRunning )
type StartupErrorCode ¶
type StartupErrorCode int
const ( CodeAlreadyRunning StartupErrorCode = iota + 1 CodeAlreadyRunningForOtherUser CodeFailedToCreateUnixScoket CodeMeshnetNotEnabled CodeAddressAlreadyInUse CodeFailedToEnable )
Click to show internal directories.
Click to hide internal directories.