Documentation ¶
Index ¶
Constants ¶
View Source
const ( SensorIPCModeDirect = "direct" SensorIPCModeProxy = "proxy" SensorBinPath = "/opt/_slim/bin/slim-sensor" ContainerNamePat = "slimk_%v_%v" ArtifactsDir = "artifacts" ReportArtifactTar = "creport.tar" FileArtifactsOutTar = "files_out.tar" // FileArtifactsArchiveTar = "files_archive.tar" SensorMountPat = "%s:/opt/_slim/bin/slim-sensor:ro" VolumeSensorMountPat = "%s:/opt/_slim/bin:ro" LabelName = "_slim" MondelArtifactTar = "mondel.tar" )
Container inspector constants
Variables ¶
View Source
var ErrStartMonitorTimeout = goerr.New("start monitor timeout")
Functions ¶
This section is empty.
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 PreservePaths map[string]*fsutil.AccessInfo IncludePaths map[string]*fsutil.AccessInfo IncludeBins map[string]*fsutil.AccessInfo IncludeExes map[string]*fsutil.AccessInfo DoIncludeShell bool DoIncludeWorkdir bool DoIncludeCertAll bool DoIncludeCertBundles bool DoIncludeCertDirs bool DoIncludeCertPKAll bool DoIncludeCertPKDirs bool DoIncludeNew bool DoIncludeOSLibsNet bool DoIncludeZoneInfo bool SelectedNetworks map[string]NetNameInfo DoDebug bool LogLevel string LogFormat string PrintState bool InContainer bool RTASourcePT bool DoObfuscateMetadata bool 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, preservePaths map[string]*fsutil.AccessInfo, includePaths map[string]*fsutil.AccessInfo, includeBins map[string]*fsutil.AccessInfo, includeExes map[string]*fsutil.AccessInfo, doIncludeShell bool, doIncludeWorkdir bool, doIncludeCertAll bool, doIncludeCertBundles bool, doIncludeCertDirs bool, doIncludeCertPKAll bool, doIncludeCertPKDirs bool, doIncludeNew bool, doIncludeOSLibsNet bool, doIncludeZoneInfo bool, selectedNetworks map[string]NetNameInfo, doDebug bool, logLevel string, logFormat string, inContainer bool, rtaSourcePT bool, doObfuscateMetadata bool, 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.