func (xdsC *Client) SetBootstrapConfig(cfg *bootstrap.Config) {
	xdsC.bootstrapCfg = cfg
}
SetBootstrapConfig updates the bootstrap config.
package fakeclient
import (
	"context"
	"google.golang.org/grpc/internal/grpcsync"
	"google.golang.org/grpc/internal/testutils"
	"google.golang.org/grpc/xds/internal/xdsclient"
	"google.golang.org/grpc/xds/internal/xdsclient/bootstrap"
	"google.golang.org/grpc/xds/internal/xdsclient/load"
)
type Client struct {
	xdsclient.XDSClient
	name         string
	ldsWatchCh   *testutils.Channel
	rdsWatchCh   *testutils.Channel
	cdsWatchCh   *testutils.Channel
	edsWatchCh   *testutils.Channel
	ldsCancelCh  *testutils.Channel
	rdsCancelCh  *testutils.Channel
	cdsCancelCh  *testutils.Channel
	edsCancelCh  *testutils.Channel
	loadReportCh *testutils.Channel
	lrsCancelCh  *testutils.Channel
	loadStore    *load.Store
	bootstrapCfg *bootstrap.Config
	ldsCb  func(xdsclient.ListenerUpdate, error)
	rdsCbs map[string]func(xdsclient.RouteConfigUpdate, error)
	cdsCbs map[string]func(xdsclient.ClusterUpdate, error)
	edsCbs map[string]func(xdsclient.EndpointsUpdate, error)
	Closed *grpcsync.Event  
}
func (xdsC *Client) WatchListener(serviceName string, callback func(xdsclient.ListenerUpdate, error)) func() {
	xdsC.ldsCb = callback
	xdsC.ldsWatchCh.Send(serviceName)
	return func() {
		xdsC.ldsCancelCh.Send(nil)
	}
}
func (xdsC *Client) WaitForWatchListener(ctx context.Context) (string, error) {
	val, err := xdsC.ldsWatchCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return val.(string), err
}
func (xdsC *Client) InvokeWatchListenerCallback(update xdsclient.ListenerUpdate, err error) {
	xdsC.ldsCb(update, err)
}
func (xdsC *Client) WaitForCancelListenerWatch(ctx context.Context) error {
	_, err := xdsC.ldsCancelCh.Receive(ctx)
	return err
}
func (xdsC *Client) WatchRouteConfig(routeName string, callback func(xdsclient.RouteConfigUpdate, error)) func() {
	xdsC.rdsCbs[routeName] = callback
	xdsC.rdsWatchCh.Send(routeName)
	return func() {
		xdsC.rdsCancelCh.Send(routeName)
	}
}
func (xdsC *Client) WaitForWatchRouteConfig(ctx context.Context) (string, error) {
	val, err := xdsC.rdsWatchCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return val.(string), err
}
func (xdsC *Client) InvokeWatchRouteConfigCallback(name string, update xdsclient.RouteConfigUpdate, err error) {
	if len(xdsC.rdsCbs) != 1 {
		xdsC.rdsCbs[name](update, err)
		return
	}
	var routeName string
	for route := range xdsC.rdsCbs {
		routeName = route
	}
	xdsC.rdsCbs[routeName](update, err)
}
func (xdsC *Client) WaitForCancelRouteConfigWatch(ctx context.Context) (string, error) {
	val, err := xdsC.rdsCancelCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return val.(string), err
}
func (xdsC *Client) WatchCluster(clusterName string, callback func(xdsclient.ClusterUpdate, error)) func() {
	xdsC.cdsCbs[clusterName] = callback
	xdsC.cdsWatchCh.Send(clusterName)
	return func() {
		xdsC.cdsCancelCh.Send(clusterName)
	}
}
func (xdsC *Client) WaitForWatchCluster(ctx context.Context) (string, error) {
	val, err := xdsC.cdsWatchCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return val.(string), err
}
func (xdsC *Client) InvokeWatchClusterCallback(update xdsclient.ClusterUpdate, err error) {
	if len(xdsC.cdsCbs) == 1 {
		var clusterName string
		for cluster := range xdsC.cdsCbs {
			clusterName = cluster
		}
		xdsC.cdsCbs[clusterName](update, err)
	} else {
		xdsC.cdsCbs[update.ClusterName](update, err)
	}
}
func (xdsC *Client) WaitForCancelClusterWatch(ctx context.Context) (string, error) {
	clusterNameReceived, err := xdsC.cdsCancelCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return clusterNameReceived.(string), err
}
func (xdsC *Client) WatchEndpoints(clusterName string, callback func(xdsclient.EndpointsUpdate, error)) (cancel func()) {
	xdsC.edsCbs[clusterName] = callback
	xdsC.edsWatchCh.Send(clusterName)
	return func() {
		xdsC.edsCancelCh.Send(clusterName)
	}
}
func (xdsC *Client) WaitForWatchEDS(ctx context.Context) (string, error) {
	val, err := xdsC.edsWatchCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return val.(string), err
}
func (xdsC *Client) InvokeWatchEDSCallback(name string, update xdsclient.EndpointsUpdate, err error) {
	if len(xdsC.edsCbs) != 1 {
		xdsC.edsCbs[name](update, err)
		return
	}
	for n := range xdsC.edsCbs {
		name = n
	}
	xdsC.edsCbs[name](update, err)
}
func (xdsC *Client) WaitForCancelEDSWatch(ctx context.Context) (string, error) {
	edsNameReceived, err := xdsC.edsCancelCh.Receive(ctx)
	if err != nil {
		return "", err
	}
	return edsNameReceived.(string), err
}
type ReportLoadArgs struct {
	Server string
}
func (xdsC *Client) ReportLoad(server string) (loadStore *load.Store, cancel func()) {
	xdsC.loadReportCh.Send(ReportLoadArgs{Server: server})
	return xdsC.loadStore, func() {
		xdsC.lrsCancelCh.Send(nil)
	}
}
func (xdsC *Client) WaitForCancelReportLoad(ctx context.Context) error {
	_, err := xdsC.lrsCancelCh.Receive(ctx)
	return err
}
func (xdsC *Client) LoadStore() *load.Store {
	return xdsC.loadStore
}
func (xdsC *Client) WaitForReportLoad(ctx context.Context) (ReportLoadArgs, error) {
	val, err := xdsC.loadReportCh.Receive(ctx)
	if err != nil {
		return ReportLoadArgs{}, err
	}
	return val.(ReportLoadArgs), nil
}
func (xdsC *Client) Close() {
	xdsC.Closed.Fire()
}
func (xdsC *Client) BootstrapConfig() *bootstrap.Config {
	return xdsC.bootstrapCfg
}