package test

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

Package test contains test utilities

Index

Constants

const (
	// Hello is the echo message
	Hello = "Hi, there!\n"
)

Functions

func RunAccessLogServer

func RunAccessLogServer(ctx context.Context, alsv2 *testv2.AccessLogService, alsv3 *testv3.AccessLogService, alsPort uint)

RunAccessLogServer starts an accesslog server.

func RunHTTP

func RunHTTP(ctx context.Context, upstreamPort uint)

RunHTTP opens a simple listener on the port.

func RunManagementGateway

func RunManagementGateway(ctx context.Context, srv2 serverv2.Server, srv3 serverv3.Server, port uint, lg gcplogger.Logger)

RunManagementGateway starts an HTTP gateway to an xDS server.

func RunManagementServer

func RunManagementServer(ctx context.Context, srv2 serverv2.Server, srv3 serverv3.Server, port uint)

RunManagementServer starts an xDS server at the given port.

Types

type HTTPGateway

type HTTPGateway struct {
	// Log is an optional log for errors in response write
	Log gcplogger.Logger

	GatewayV2 serverv2.HTTPGateway

	GatewayV3 serverv3.HTTPGateway
}

HTTPGateway is a custom implementation of [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) specialized to Envoy xDS API.

func (*HTTPGateway) ServeHTTP

func (h *HTTPGateway) ServeHTTP(resp http.ResponseWriter, req *http.Request)

Source Files

server.go

Directories

PathSynopsis
pkg/test/mainPackage main contains the test driver for testing xDS manually.
pkg/test/resource
pkg/test/resource/v2Package resource creates test xDS resources
pkg/test/resource/v3Package resource creates test xDS resources
pkg/test/v2Package test contains test utilities
pkg/test/v3Code generated by create_version.
Version
v0.9.5
Published
Apr 1, 2020
Platform
darwin/amd64
Imports
11 packages
Last checked
50 seconds ago

Tools for package owners.