func (r *ReverseTunnelCommand) ListActive(client *auth.TunClient) error {
	tunnels, err := client.GetReverseTunnels()
	if err != nil {
		return trace.Wrap(err)
	}
	tunnelsView := func() string {
		t := goterm.NewTable(0, 10, 5, ' ', 0)
		printHeader(t, []string{"Domain", "Dial Addresses"})
		if len(tunnels) == 0 {
			return t.String()
		}
		for _, tunnel := range tunnels {
			fmt.Fprintf(t, "%v\t%v\n", tunnel.DomainName, strings.Join(tunnel.DialAddrs, ","))
		}
		return t.String()
	}
	fmt.Printf(tunnelsView())
	return nil
}
// ListActive retreives the list of nodes who recently sent heartbeats to
// to a cluster and prints it to stdout
ListActive retreives the list of nodes who recently sent heartbeats to
to a cluster and prints it to stdout
// ListActive retreives the list of nodes who recently sent heartbeats to // to a cluster and prints it to stdout
func (r *ReverseTunnelCommand) ListActive(client *auth.TunClient) error {
	tunnels, err := client.GetReverseTunnels()
	if err != nil {
		return trace.Wrap(err)
	}
	tunnelsView := func() string {
		t := goterm.NewTable(0, 10, 5, ' ', 0)
		printHeader(t, []string{"Domain", "Dial Addresses"})
		if len(tunnels) == 0 {
			return t.String()
		}
		for _, tunnel := range tunnels {
			fmt.Fprintf(t, "%v\t%v\n", tunnel.DomainName, strings.Join(tunnel.DialAddrs, ","))
		}
		return t.String()
	}
	fmt.Printf(tunnelsView())
	return nil
}
func ( r * ReverseTunnelCommand ) ListActive ( client * auth . TunClient ) error { tunnels , err := client . GetReverseTunnels ( ) if err != nil { return trace . Wrap ( err ) } tunnelsView := func ( ) string { t := goterm . NewTable ( 0 , 10 , 5 , ' ' , 0 ) printHeader ( t , [ ] string { " " , " " } ) if len ( tunnels ) == 0 { return t . String ( ) } for _ , tunnel := range tunnels { fmt . Fprintf ( t , " \t \n " , tunnel . DomainName , strings . Join ( tunnel . DialAddrs , " " ) ) } return t . String ( ) } fmt . Printf ( tunnelsView ( ) ) return nil }
ListActive retreives the list of nodes who recently sent heartbeats to
to a cluster and prints it to stdout
ListActive retreives the list of nodes who recently sent heartbeats to to a cluster and prints it to stdout