func (subChMap *subChannelMap) IntrospectState(opts *IntrospectionOptions) map[string]SubChannelRuntimeState {
	m := make(map[string]SubChannelRuntimeState)
	subChMap.RLock()
	for k, sc := range subChMap.subchannels {
		state := SubChannelRuntimeState{
			Service:  k,
			Isolated: sc.Isolated(),
		}
		if state.Isolated {
			state.IsolatedPeers = sc.Peers().IntrospectList(opts)
		}
		if hmap, ok := sc.handler.(*handlerMap); ok {
			state.Handler.Type = methodHandler
			methods := make([]string, 0, len(hmap.handlers))
			for k := range hmap.handlers {
				methods = append(methods, k)
			}
			sort.Strings(methods)
			state.Handler.Methods = methods
		} else {
			state.Handler.Type = overrideHandler
		}
		m[k] = state
	}
	subChMap.RUnlock()
	return m
}
func (subChMap *subChannelMap) IntrospectState(opts *IntrospectionOptions) map[string]SubChannelRuntimeState {
	m := make(map[string]SubChannelRuntimeState)
	subChMap.RLock()
	for k, sc := range subChMap.subchannels {
		state := SubChannelRuntimeState{
			Service:  k,
			Isolated: sc.Isolated(),
		}
		if state.Isolated {
			state.IsolatedPeers = sc.Peers().IntrospectList(opts)
		}
		if hmap, ok := sc.handler.(*handlerMap); ok {
			state.Handler.Type = methodHandler
			methods := make([]string, 0, len(hmap.handlers))
			for k := range hmap.handlers {
				methods = append(methods, k)
			}
			sort.Strings(methods)
			state.Handler.Methods = methods
		} else {
			state.Handler.Type = overrideHandler
		}
		m[k] = state
	}
	subChMap.RUnlock()
	return m
}
func ( subChMap * subChannelMap ) IntrospectState ( opts * IntrospectionOptions ) map [ string ] SubChannelRuntimeState { m := make ( map [ string ] SubChannelRuntimeState ) subChMap . RLock ( ) for k , sc := range subChMap . subchannels { state := SubChannelRuntimeState { Service : k , Isolated : sc . Isolated ( ) , } if state . Isolated { state . IsolatedPeers = sc . Peers ( ) . IntrospectList ( opts ) } if hmap , ok := sc . handler . ( * handlerMap ) ; ok { state . Handler . Type = methodHandler methods := make ( [ ] string , 0 , len ( hmap . handlers ) ) for k := range hmap . handlers { methods = append ( methods , k ) } sort . Strings ( methods ) state . Handler . Methods = methods } else { state . Handler . Type = overrideHandler } m [ k ] = state } subChMap . RUnlock ( ) return m }
// IntrospectState returns the runtime state of the subchannels.
IntrospectState returns the runtime state of the subchannels .