// MakeCluster creates a cluster.
MakeCluster creates a cluster.
// MakeCluster creates a cluster .
func MakeCluster(ads bool, clusterName string) *v2.Cluster {
	var edsSource *core.ConfigSource
	if ads {
		edsSource = &core.ConfigSource{
			ConfigSourceSpecifier: &core.ConfigSource_Ads{
				Ads: &core.AggregatedConfigSource{},
			},
		}
	} else {
		edsSource = &core.ConfigSource{
			ConfigSourceSpecifier: &core.ConfigSource_ApiConfigSource{
				ApiConfigSource: &core.ApiConfigSource{
					ApiType:      core.ApiConfigSource_GRPC,
					ClusterNames: []string{XdsCluster},
				},
			},
		}
	}
	return &v2.Cluster{
		Name:           clusterName,
		ConnectTimeout: 5 * time.Second,
		Type:           v2.Cluster_EDS,
		EdsClusterConfig: &v2.Cluster_EdsClusterConfig{
			EdsConfig:   edsSource,
			ServiceName: clusterName,
		},
	}
}
func MakeCluster ( ads bool , clusterName string ) * v2 . Cluster { var edsSource * core . ConfigSource if ads { edsSource = & core . ConfigSource { ConfigSourceSpecifier : & core . ConfigSource_Ads { Ads : & core . AggregatedConfigSource { } , } , } } else { edsSource = & core . ConfigSource { ConfigSourceSpecifier : & core . ConfigSource_ApiConfigSource { ApiConfigSource : & core . ApiConfigSource { ApiType : core . ApiConfigSource_GRPC , ClusterNames : [ ] string { XdsCluster } , } , } , } } return & v2 . Cluster { Name : clusterName , ConnectTimeout : 5 * time . Second , Type : v2 . Cluster_EDS , EdsClusterConfig : & v2 . Cluster_EdsClusterConfig { EdsConfig : edsSource , ServiceName : clusterName , } , } }
MakeCluster creates a cluster.
MakeCluster creates a cluster .