benchmark/real_relay.go
func NewRealRelay(services map[string][]string) (Relay, error) {
	hosts := &fixedHosts{hosts: services}
	ch, err := tchannel.NewChannel("relay", &tchannel.ChannelOptions{
		RelayHost: relaytest.HostFunc(hosts.Get),
		Logger:    tchannel.NewLevelLogger(tchannel.NewLogger(os.Stderr), tchannel.LogLevelWarn),
	})
	if err != nil {
		return nil, err
	}

	if err := ch.ListenAndServe("127.0.0.1:0"); err != nil {
		return nil, err
	}

	return &realRelay{
		ch:    ch,
		hosts: hosts,
	}, nil
}
func NewRealRelay(services map[string][]string) (Relay, error) {
	hosts := &fixedHosts{hosts: services}
	ch, err := tchannel.NewChannel("relay", &tchannel.ChannelOptions{
		RelayHost: relaytest.HostFunc(hosts.Get),
		Logger:    tchannel.NewLevelLogger(tchannel.NewLogger(os.Stderr), tchannel.LogLevelWarn),
	})
	if err != nil {
		return nil, err
	}

	if err := ch.ListenAndServe("127.0.0.1:0"); err != nil {
		return nil, err
	}

	return &realRelay{
		ch:    ch,
		hosts: hosts,
	}, nil
}
// NewRealRelay creates a TChannel relay.