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, als *AccessLogService, port uint)

RunAccessLogServer starts an accesslog service.

func RunHTTP

func RunHTTP(ctx context.Context, upstreamPort uint)

RunHTTP opens a simple listener on the port.

func RunManagementGateway

func RunManagementGateway(ctx context.Context, srv xds.Server, port uint)

RunManagementGateway starts an HTTP gateway to an xDS server.

func RunManagementServer

func RunManagementServer(ctx context.Context, server xds.Server, port uint)

RunManagementServer starts an xDS server at the given port.

Types

type AccessLogService

type AccessLogService struct {
	// contains filtered or unexported fields
}

AccessLogService buffers access logs from the remote Envoy nodes.

func (*AccessLogService) Dump

func (svc *AccessLogService) Dump(f func(string))

Dump releases the collected log entries and clears the log entry list.

func (*AccessLogService) StreamAccessLogs

func (svc *AccessLogService) StreamAccessLogs(stream als.AccessLogService_StreamAccessLogsServer) error

StreamAccessLogs implements the access log service.

type Hasher

type Hasher struct {
}

Hasher returns node ID as an ID

func (Hasher) ID

func (h Hasher) ID(node *core.Node) string

ID function

Source Files

accesslog.go server.go

Directories

PathSynopsis
pkg/test/mainPackage main contains the test driver for testing xDS manually.
pkg/test/resourcePackage resource creates test xDS resources
Version
v0.8.3
Published
Jul 31, 2019
Platform
darwin/amd64
Imports
14 packages
Last checked
9 minutes ago

Tools for package owners.