processmon

package
v10.279.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package processmon is to manage and monitor remote enforcers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessManager

type ProcessManager interface {
	KillRemoteEnforcer(contextID string, force bool) error
	LaunchRemoteEnforcer(contextID string, refPid int, refNsPath string, arg string, statssecret string, procMountPoint string, enforcerType policy.EnforcerType) (bool, error)
}

ProcessManager interface exposes methods implemented by a processmon

func New

New is a method to create a new remote process monitor.

type RemoteMonitor

type RemoteMonitor struct {

	// DisableLogWrite flag tells if we are running in kubernetes.
	DisableLogWrite bool

	sync.Mutex
	// contains filtered or unexported fields
}

RemoteMonitor is an instance of processMonitor

func (*RemoteMonitor) KillRemoteEnforcer

func (p *RemoteMonitor) KillRemoteEnforcer(contextID string, force bool) error

KillRemoteEnforcer sends a rpc to the process to exit failing which it will kill the process

func (*RemoteMonitor) LaunchRemoteEnforcer

func (p *RemoteMonitor) LaunchRemoteEnforcer(
	contextID string,
	refPid int,
	refNSPath string,
	arg string,
	statsServerSecret string,
	procMountPoint string,
	enforcerType policy.EnforcerType,
) (bool, error)

LaunchRemoteEnforcer prepares the environment and launches the process. If the process is already launched, it will notify the caller, so that it can avoid any new initialization.

Directories

Path Synopsis
Package mockprocessmon is a generated GoMock package.
Package mockprocessmon is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL