transportv1

package
v0.0.0-...-9e531fb Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a wrapper around a transportv1.TransportServiceClient that hides the implementation details of establishing connections over gRPC streams.

func NewClient

func NewClient(client transportv1pb.TransportServiceClient) (*Client, error)

NewClient constructs a Client that operates on the provided transportv1pb.TransportServiceClient. An error is returned if the client provided is nil.

func (*Client) ClusterDetails

func (c *Client) ClusterDetails(ctx context.Context) (*transportv1pb.ClusterDetails, error)

ClusterDetails retrieves the cluster details as observed by the Teleport Proxy that the Client is connected to.

func (*Client) DialCluster

func (c *Client) DialCluster(ctx context.Context, cluster string, src net.Addr) (net.Conn, error)

DialCluster establishes a connection to the provided cluster. The provided src address will be used as the LocalAddr of the returned net.Conn.

func (*Client) DialHost

func (c *Client) DialHost(ctx context.Context, hostport, cluster string, src net.Addr, keyring agent.ExtendedAgent) (net.Conn, *transportv1pb.ClusterDetails, error)

DialHost establishes a connection to the instance in the provided cluster that matches the hostport. If a keyring is provided then it will be forwarded to the remote instance. The src address will be used as the LocalAddr of the returned net.Conn.

Jump to

Keyboard shortcuts

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