Movatterモバイル変換


[0]ホーム

URL:


testutils

package
v1.77.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License:Apache-2.0Imports:2Imported by:0

Details

Repository

github.com/grpc/grpc-go

Links

Documentation

Overview

Package testutils provides utility types, for use in xds tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcBuildResourceName

func BuildResourceName(typeName, auth, idstring, ctxParams map[string]string)string

BuildResourceName returns the resource name in the format of an xdstp://resource.

Types

typeTestResourceWatcher

type TestResourceWatcher struct {// UpdateCh is the channel on which xDS client updates are delivered.UpdateCh chan *xdsresource.ResourceData// AmbientErrorCh is the channel on which ambient errors from the xDS// client are delivered.AmbientErrorCh chanerror// ResourceErrorCh is the channel on which resource errors from the xDS// client are delivered.ResourceErrorCh chan struct{}}

TestResourceWatcher implements the xdsresource.ResourceWatcher interface,used to receive updates on watches registered with the xDS client, when usingthe resource-type agnostic WatchResource API.

Tests can use the channels provided by this type to get access to updates anderrors sent by the xDS client.

funcNewTestResourceWatcher

func NewTestResourceWatcher() *TestResourceWatcher

NewTestResourceWatcher returns a TestResourceWatcher to watch for resourcesvia the xDS client.

func (*TestResourceWatcher)AmbientError

func (w *TestResourceWatcher) AmbientError(errerror, onDone func())

AmbientError is invoked by the xDS client to report the latest ambienterror.

func (*TestResourceWatcher)ResourceChanged

func (w *TestResourceWatcher) ResourceChanged(dataxdsresource.ResourceData, onDone func())

ResourceChanged is invoked by the xDS client to report the latest update.

func (*TestResourceWatcher)ResourceError

func (w *TestResourceWatcher) ResourceError(errerror, onDone func())

ResourceError is invoked by the xDS client to report the latest error tostop watching the resource.

Source Files

View all Source files

Directories

PathSynopsis
Package fakeclient provides a fake implementation of an xDS client.
Package fakeclient provides a fake implementation of an xDS client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp