func (dc *DockerCenter) GetAllAcceptedInfo(
	includeLabel map[string]string,
	excludeLabel map[string]string,
	includeLabelRegex map[string]*regexp.Regexp,
	excludeLabelRegex map[string]*regexp.Regexp,
	includeEnv map[string]string,
	excludeEnv map[string]string,
	includeEnvRegex map[string]*regexp.Regexp,
	excludeEnvRegex map[string]*regexp.Regexp,
	k8sFilter *K8SFilter,
) map[string]*DockerInfoDetail {
	containerMap := make(map[string]*DockerInfoDetail)
	dc.lock.RLock()
	defer dc.lock.RUnlock()
	for id, info := range dc.containerMap {
		if IsContainerLabelMatch(includeLabel, excludeLabel, includeLabelRegex, excludeLabelRegex, info) &&
			IsContainerEnvMatch(includeEnv, excludeEnv, includeEnvRegex, excludeEnvRegex, info) &&
			info.K8SInfo.IsMatch(k8sFilter) {
			containerMap[id] = info
		}
	}
	return containerMap
}
// GetAllAcceptedInfo gathers all info of containers that match the input parameters.
// Two conditions (&&) for matched container:
// 1. has a label in @includeLabel and don't have any label in @excludeLabel.
// 2. has a env in @includeEnv and don't have any env in @excludeEnv.
// If the input parameters is empty, then all containers are matched.
// It returns a map contains docker container info.
GetAllAcceptedInfo gathers all info of containers that match the input parameters.
Two conditions (&&) for matched container:
1. has a label in @includeLabel and don't have any label in @excludeLabel.
2. has a env in @includeEnv and don't have any env in @excludeEnv.
If the input parameters is empty, then all containers are matched.
It returns a map contains docker container info.
// GetAllAcceptedInfo gathers all info of containers that match the input parameters . // Two conditions ( && ) for matched container : // 1 . has a label in @includeLabel and don ' t have any label in @excludeLabel . // 2 . has a env in @includeEnv and don ' t have any env in @excludeEnv . // If the input parameters is empty then all containers are matched . // It returns a map contains docker container info .
func (dc *DockerCenter) GetAllAcceptedInfo(
	includeLabel map[string]string,
	excludeLabel map[string]string,
	includeLabelRegex map[string]*regexp.Regexp,
	excludeLabelRegex map[string]*regexp.Regexp,
	includeEnv map[string]string,
	excludeEnv map[string]string,
	includeEnvRegex map[string]*regexp.Regexp,
	excludeEnvRegex map[string]*regexp.Regexp,
	k8sFilter *K8SFilter,
) map[string]*DockerInfoDetail {
	containerMap := make(map[string]*DockerInfoDetail)
	dc.lock.RLock()
	defer dc.lock.RUnlock()
	for id, info := range dc.containerMap {
		if IsContainerLabelMatch(includeLabel, excludeLabel, includeLabelRegex, excludeLabelRegex, info) &&
			IsContainerEnvMatch(includeEnv, excludeEnv, includeEnvRegex, excludeEnvRegex, info) &&
			info.K8SInfo.IsMatch(k8sFilter) {
			containerMap[id] = info
		}
	}
	return containerMap
}
func ( dc * DockerCenter ) GetAllAcceptedInfo ( includeLabel map [ string ] string , excludeLabel map [ string ] string , includeLabelRegex map [ string ] * regexp . Regexp , excludeLabelRegex map [ string ] * regexp . Regexp , includeEnv map [ string ] string , excludeEnv map [ string ] string , includeEnvRegex map [ string ] * regexp . Regexp , excludeEnvRegex map [ string ] * regexp . Regexp , k8sFilter * K8SFilter , ) map [ string ] * DockerInfoDetail { containerMap := make ( map [ string ] * DockerInfoDetail ) dc . lock . RLock ( ) defer dc . lock . RUnlock ( ) for id , info := range dc . containerMap { if IsContainerLabelMatch ( includeLabel , excludeLabel , includeLabelRegex , excludeLabelRegex , info ) && IsContainerEnvMatch ( includeEnv , excludeEnv , includeEnvRegex , excludeEnvRegex , info ) && info . K8SInfo . IsMatch ( k8sFilter ) { containerMap [ id ] = info } } return containerMap }
GetAllAcceptedInfo gathers all info of containers that match the input parameters.
GetAllAcceptedInfo gathers all info of containers that match the input parameters .