Documentation
¶
Index ¶
Constants ¶
View Source
const ( SensorIPCModeDirect = "direct" SensorIPCModeProxy = "proxy" SensorBinPath = "/opt/_mint/bin/mint-sensor" ContainerNamePat = "mintk_%v_%v" ArtifactsDir = "artifacts" ReportArtifactTar = "creport.tar" FileArtifactsOutTar = "files_out.tar" // FileArtifactsArchiveTar = "files_archive.tar" SensorMountPat = "%s:/opt/_mint/bin/mint-sensor:ro" VolumeSensorMountPat = "%s:/opt/_mint/bin:ro" LabelName = "_mint" MondelArtifactTar = "mondel.tar" )
Container inspector constants
Variables ¶
View Source
var ErrStartMonitorTimeout = errors.New("start monitor timeout")
Functions ¶
Types ¶
type Inspector ¶
type Inspector struct {
ContainerInfo *dockerapi.Container
ContainerPortsInfo string
ContainerPortList string
AvailablePorts map[dockerapi.Port]dockerapi.PortBinding // Ports found to be available for probing.
ContainerID string
ContainerName string
FatContainerCmd []string
LocalVolumePath string
DoUseLocalMounts bool
SensorVolumeName string
DoKeepTmpArtifacts bool
StatePath string
CmdPort dockerapi.Port
EvtPort dockerapi.Port
DockerHostIP string
ImageInspector *image.Inspector
APIClient *dockerapi.Client
Overrides *config.ContainerOverrides
ExplicitVolumeMounts map[string]config.VolumeMount
BaseMounts []dockerapi.HostMount
BaseVolumesFrom []string
DoPublishExposedPorts bool
HasClassicLinks bool
Links []string
EtcHostsMaps []string
DNSServers []string
DNSSearchDomains []string
DoShowContainerLogs bool
DoEnableMondel bool
RunTargetAsUser bool
KeepPerms bool
PathPerms map[string]*fsutil.AccessInfo
ExcludePatterns map[string]*fsutil.AccessInfo
DoExcludeVarLockFiles bool
PreservePaths map[string]*fsutil.AccessInfo
IncludePaths map[string]*fsutil.AccessInfo
IncludeBins map[string]*fsutil.AccessInfo
IncludeDirBinsList map[string]*fsutil.AccessInfo
IncludeExes map[string]*fsutil.AccessInfo
DoIncludeShell bool
DoIncludeWorkdir bool
DoIncludeHealthcheck bool
DoIncludeDistroInfo bool
DoIncludeCertAll bool
DoIncludeCertBundles bool
DoIncludeCertDirs bool
DoIncludeCertPKAll bool
DoIncludeCertPKDirs bool
DoIncludeNew bool
DoIncludeSSHClient bool
DoIncludeOSLibsNet bool
DoIncludeZoneInfo bool
SelectedNetworks map[string]NetNameInfo
DoDebug bool
LogLevel string
LogFormat string
PrintState bool
InContainer bool
CRTIOInactivityTimeout int
CRTCopyInactivityTimeout int
RTASourcePT bool
DoObfuscateMetadata bool
ObfuscateAppPackageNames string
SensorIPCEndpoint string
SensorIPCMode string
TargetHost string
// contains filtered or unexported fields
}
Inspector is a container execution inspector
func NewInspector ¶
func NewInspector( xc *app.ExecutionContext, crOpts *config.ContainerRunOptions, logger *log.Entry, client *dockerapi.Client, statePath string, imageInspector *image.Inspector, localVolumePath string, doUseLocalMounts bool, sensorVolumeName string, doKeepTmpArtifacts bool, overrides *config.ContainerOverrides, explicitVolumeMounts map[string]config.VolumeMount, baseMounts []dockerapi.HostMount, baseVolumesFrom []string, portBindings map[dockerapi.Port][]dockerapi.PortBinding, doPublishExposedPorts bool, hasClassicLinks bool, links []string, etcHostsMaps []string, dnsServers []string, dnsSearchDomains []string, showContainerLogs bool, doEnableMondel bool, runTargetAsUser bool, keepPerms bool, pathPerms map[string]*fsutil.AccessInfo, excludePatterns map[string]*fsutil.AccessInfo, doExcludeVarLockFiles bool, preservePaths map[string]*fsutil.AccessInfo, includePaths map[string]*fsutil.AccessInfo, includeBins map[string]*fsutil.AccessInfo, includeDirBinsList map[string]*fsutil.AccessInfo, includeExes map[string]*fsutil.AccessInfo, doIncludeShell bool, doIncludeWorkdir bool, doIncludeHealthcheck bool, doIncludeDistroInfo bool, doIncludeCertAll bool, doIncludeCertBundles bool, doIncludeCertDirs bool, doIncludeCertPKAll bool, doIncludeCertPKDirs bool, doIncludeNew bool, doIncludeSSHClient bool, doIncludeOSLibsNet bool, doIncludeZoneInfo bool, selectedNetworks map[string]NetNameInfo, doDebug bool, logLevel string, logFormat string, inContainer bool, crtIOInactivityTimeout int, crtCopyInactivityTimeout int, rtaSourcePT bool, doObfuscateMetadata bool, obfuscateAppPackageNames string, sensorIPCEndpoint string, sensorIPCMode string, printState bool, appNodejsInspectOpts config.AppNodejsInspectOptions) (*Inspector, error)
NewInspector creates a new container execution inspector
func (*Inspector) FinishMonitoring ¶
func (i *Inspector) FinishMonitoring()
FinishMonitoring ends the target container monitoring activities
func (*Inspector) HasCollectedData ¶
HasCollectedData returns true if any data was produced monitoring the target container
func (*Inspector) ProcessCollectedData ¶
ProcessCollectedData performs post-processing on the collected container data
func (*Inspector) RunContainer ¶
RunContainer starts the container inspector instance execution
func (*Inspector) ShowContainerLogs ¶
func (i *Inspector) ShowContainerLogs()
func (*Inspector) ShutdownContainer ¶
ShutdownContainer terminates the container inspector instance execution
type NetNameInfo ¶
Click to show internal directories.
Click to hide internal directories.