public class TestResources extends Object
TestResources provides helper methods for generating resource messages for testing. It is not intended to be
used in production code.| Modifier and Type | Method and Description |
|---|---|
static Cds.Cluster |
createCluster(String clusterName)
Returns a new test cluster using EDS.
|
static Cds.Cluster |
createCluster(String clusterName,
String address,
int port)
Returns a new test cluster not using EDS.
|
static Eds.ClusterLoadAssignment |
createEndpoint(String clusterName,
int port)
Returns a new test endpoint for the given cluster.
|
static Lds.Listener |
createListener(boolean ads,
String listenerName,
int port,
String routeName)
Returns a new test listener.
|
static Rds.RouteConfiguration |
createRoute(String routeName,
String clusterName)
Returns a new test route.
|
static Cert.Secret |
createSecret(String secretName)
Returns a new test secret.
|
public static Cds.Cluster createCluster(String clusterName)
clusterName - name of the new clusterpublic static Cds.Cluster createCluster(String clusterName, String address, int port)
clusterName - name of the new clusteraddress - address to use for the cluster endpointport - port to use for the cluster endpointpublic static Eds.ClusterLoadAssignment createEndpoint(String clusterName, int port)
clusterName - name of the test cluster that is associated with this endpointport - port to use for the endpointpublic static Lds.Listener createListener(boolean ads, String listenerName, int port, String routeName)
ads - should RDS for the listener be configured to use XDS?listenerName - name of the new listenerport - port to use for the listenerrouteName - name of the test route that is associated with this listenerpublic static Rds.RouteConfiguration createRoute(String routeName, String clusterName)
routeName - name of the new routeclusterName - name of the test cluster that is associated with this routepublic static Cert.Secret createSecret(String secretName)
secretName - name of the new secretCopyright © 2018 The Envoy Project. All rights reserved.