func (ch *Channel) registerInternal() {
	endpoints := []struct {
		name    string
		handler func([]byte) interface{}
	}{
		{"_gometa_introspect", ch.handleIntrospection},
		{"_gometa_runtime", handleInternalRuntime},
	}

	tchanSC := ch.GetSubChannel("tchannel")
	for _, ep := range endpoints {
		// We need ep in our closure.
		ep := ep
		handler := func(ctx context.Context, call *InboundCall) {
			var arg2, arg3 []byte
			if err := NewArgReader(call.Arg2Reader()).Read(&arg2); err != nil {
				return
			}
			if err := NewArgReader(call.Arg3Reader()).Read(&arg3); err != nil {
				return
			}
			if err := NewArgWriter(call.Response().Arg2Writer()).Write(nil); err != nil {
				return
			}
			NewArgWriter(call.Response().Arg3Writer()).WriteJSON(ep.handler(arg3))
		}
		ch.Register(HandlerFunc(handler), ep.name)
		tchanSC.Register(HandlerFunc(handler), ep.name)
	}
}
func (ch *Channel) registerInternal() {
	endpoints := []struct {
		name    string
		handler func([]byte) interface{}
	}{
		{"_gometa_introspect", ch.handleIntrospection},
		{"_gometa_runtime", handleInternalRuntime},
	}

	tchanSC := ch.GetSubChannel("tchannel")
	for _, ep := range endpoints {
		
		ep := ep
		handler := func(ctx context.Context, call *InboundCall) {
			var arg2, arg3 []byte
			if err := NewArgReader(call.Arg2Reader()).Read(&arg2); err != nil {
				return
			}
			if err := NewArgReader(call.Arg3Reader()).Read(&arg3); err != nil {
				return
			}
			if err := NewArgWriter(call.Response().Arg2Writer()).Write(nil); err != nil {
				return
			}
			NewArgWriter(call.Response().Arg3Writer()).WriteJSON(ep.handler(arg3))
		}
		ch.Register(HandlerFunc(handler), ep.name)
		tchanSC.Register(HandlerFunc(handler), ep.name)
	}
}
func ( ch * Channel ) registerInternal ( ) { endpoints := [ ] struct { name string handler func ( [ ] byte ) interface { } } { { " " , ch . handleIntrospection } , { " " , handleInternalRuntime } , } tchanSC := ch . GetSubChannel ( " " ) for _ , ep := range endpoints { // We need ep in our closure. ep := ep handler := func ( ctx context . Context , call * InboundCall ) { var arg2 , arg3 [ ] byte if err := NewArgReader ( call . Arg2Reader ( ) ) . Read ( & arg2 ) ; err != nil { return } if err := NewArgReader ( call . Arg3Reader ( ) ) . Read ( & arg3 ) ; err != nil { return } if err := NewArgWriter ( call . Response ( ) . Arg2Writer ( ) ) . Write ( nil ) ; err != nil { return } NewArgWriter ( call . Response ( ) . Arg3Writer ( ) ) . WriteJSON ( ep . handler ( arg3 ) ) } ch . Register ( HandlerFunc ( handler ) , ep . name ) tchanSC . Register ( HandlerFunc ( handler ) , ep . name ) } }
// registerInternal registers the following internal handlers which return runtime state:
//  _gometa_introspect: TChannel internal state.
//  _gometa_runtime: Golang runtime stats.
registerInternal registers the following internal handlers which return runtime state : _gometa_introspect : TChannel internal state . _gometa_runtime : Golang runtime stats .