transport

package
v1.69.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package transport defines the interface that describe the functionality required to communicate with an xDS server using streaming calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions added in v1.69.0

type BuildOptions struct {
	// ServerConfig contains the configuration that controls how the transport
	// interacts with the xDS server. This includes the server URI and the
	// credentials to use to connect to the server, among other things.
	ServerConfig *bootstrap.ServerConfig
}

BuildOptions contains the options for building a new xDS transport.

type Builder added in v1.69.0

type Builder interface {
	// Build creates a new xDS transport with the provided options.
	Build(opts BuildOptions) (Transport, error)
}

Builder is an interface for building a new xDS transport.

type StreamingCall added in v1.69.0

type StreamingCall interface {
	// Send sends the provided message on the stream.
	Send(any) error

	// Recv block until the next message is received on the stream.
	Recv() (any, error)
}

StreamingCall is an interface that provides a way to send and receive messages on a stream. The methods accept or return any.Any messages instead of concrete types to allow this interface to be used for both ADS and LRS.

type Transport

type Transport interface {
	// CreateStreamingCall creates a new streaming call to the xDS server for the
	// specified method name. The returned StreamingCall interface can be used to
	// send and receive messages on the stream.
	CreateStreamingCall(context.Context, string) (StreamingCall, error)

	// Close closes the underlying connection and cleans up any resources used by the
	// Transport.
	Close() error
}

Transport provides the functionality to communicate with an xDS server using streaming calls.

Directories

Path Synopsis
Package ads provides the implementation of an ADS (Aggregated Discovery Service) stream for the xDS client.
Package ads provides the implementation of an ADS (Aggregated Discovery Service) stream for the xDS client.
Package grpctransport provides an implementation of the transport interface using gRPC.
Package grpctransport provides an implementation of the transport interface using gRPC.
Package lrs provides the implementation of an LRS (Load Reporting Service) stream for the xDS client.
Package lrs provides the implementation of an LRS (Load Reporting Service) stream for the xDS client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL