func (ch *Channel) IntrospectOthers(opts *IntrospectionOptions) map[string][]ChannelInfo {
	if !opts.IncludeOtherChannels {
		return nil
	}

	channelMap.Lock()
	defer channelMap.Unlock()

	states := make(map[string][]ChannelInfo)
	for svc, channels := range channelMap.existing {
		channelInfos := make([]ChannelInfo, 0, len(channels))
		for _, otherChan := range channels {
			if ch == otherChan {
				continue
			}
			channelInfos = append(channelInfos, otherChan.ReportInfo(opts))
		}
		states[svc] = channelInfos
	}

	return states
}
func (ch *Channel) IntrospectOthers(opts *IntrospectionOptions) map[string][]ChannelInfo {
	if !opts.IncludeOtherChannels {
		return nil
	}

	channelMap.Lock()
	defer channelMap.Unlock()

	states := make(map[string][]ChannelInfo)
	for svc, channels := range channelMap.existing {
		channelInfos := make([]ChannelInfo, 0, len(channels))
		for _, otherChan := range channels {
			if ch == otherChan {
				continue
			}
			channelInfos = append(channelInfos, otherChan.ReportInfo(opts))
		}
		states[svc] = channelInfos
	}

	return states
}
func ( ch * Channel ) IntrospectOthers ( opts * IntrospectionOptions ) map [ string ] [ ] ChannelInfo { if ! opts . IncludeOtherChannels { return nil } channelMap . Lock ( ) defer channelMap . Unlock ( ) states := make ( map [ string ] [ ] ChannelInfo ) for svc , channels := range channelMap . existing { channelInfos := make ( [ ] ChannelInfo , 0 , len ( channels ) ) for _ , otherChan := range channels { if ch == otherChan { continue } channelInfos = append ( channelInfos , otherChan . ReportInfo ( opts ) ) } states [ svc ] = channelInfos } return states }
// IntrospectOthers returns the ChannelInfo for all other channels in this process.
IntrospectOthers returns the ChannelInfo for all other channels in this process .