go-control-plane: github.com/envoyproxy/go-control-plane/pkg/test/resource/v2 Index | Files

package resource

import "github.com/envoyproxy/go-control-plane/pkg/test/resource/v2"

Package resource creates test xDS resources

Index

Package Files

resource.go secret.go

Constants

const (

    // XdsCluster is the cluster name for the control server (used by non-ADS set-up)
    XdsCluster = "xds_cluster"

    // Ads mode for resources: one aggregated xDS service
    Ads = "ads"

    // Xds mode for resources: individual xDS services
    Xds = "xds"

    // Rest mode for resources: polling using Fetch
    Rest = "rest"
)

Variables

var (
    // RefreshDelay for the polling config source
    RefreshDelay = 500 * time.Millisecond
)

func MakeCluster Uses

func MakeCluster(mode string, clusterName string) *cluster.Cluster

MakeCluster creates a cluster using either ADS or EDS.

func MakeEndpoint Uses

func MakeEndpoint(clusterName string, port uint32) *endpoint.ClusterLoadAssignment

MakeEndpoint creates a localhost endpoint on a given port.

func MakeHTTPListener Uses

func MakeHTTPListener(mode string, listenerName string, port uint32, route string) *listener.Listener

MakeHTTPListener creates a listener using either ADS or RDS for the route.

func MakeRoute Uses

func MakeRoute(routeName, clusterName string) *route.RouteConfiguration

MakeRoute creates an HTTP route that routes to a given cluster.

func MakeRuntime Uses

func MakeRuntime(runtimeName string) *runtime.Runtime

MakeRuntime creates an RTDS layer with some fields.

func MakeSecrets Uses

func MakeSecrets(tlsName, rootName string) []*auth.Secret

MakeSecrets generates an SDS secret

func MakeTCPListener Uses

func MakeTCPListener(listenerName string, port uint32, clusterName string) *listener.Listener

MakeTCPListener creates a TCP listener for a cluster.

type TestSnapshot Uses

type TestSnapshot struct {
    // Xds indicates snapshot mode: ads, xds, or rest
    Xds string
    // Version for the snapshot.
    Version string
    // UpstreamPort for the single endpoint on the localhost.
    UpstreamPort uint32
    // BasePort is the initial port for the listeners.
    BasePort uint32
    // NumClusters is the total number of clusters to generate.
    NumClusters int
    // NumHTTPListeners is the total number of HTTP listeners to generate.
    NumHTTPListeners int
    // NumTCPListeners is the total number of TCP listeners to generate.
    // Listeners are assigned clusters in a round-robin fashion.
    NumTCPListeners int
    // NumRuntimes is the total number of RTDS layers to generate.
    NumRuntimes int
    // TLS enables SDS-enabled TLS mode on all listeners
    TLS bool
}

TestSnapshot holds parameters for a synthetic snapshot.

func (TestSnapshot) Generate Uses

func (ts TestSnapshot) Generate() cache.Snapshot

Generate produces a snapshot from the parameters.

Package resource imports 19 packages (graph) and is imported by 1 packages. Updated 2020-08-05. Refresh now. Tools for package owners.