transport

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QUIC

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

QUIC implements the Transport interface to establish connections to servers using the QUIC protocol. It maintains a single connection per server, optimizing dialing times and reducing connection overhead. By leveraging streams for individual server connections, it enhances overall performance and resource utilization.

func NewQUIC

func NewQUIC(logger *slog.Logger) *QUIC

NewQUIC creates a new QUIC transport instance.

func (*QUIC) Dial

func (q *QUIC) Dial(ctx context.Context, addr string) (io.ReadWriteCloser, error)

Dial ...

type Spectral added in v0.0.29

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

Spectral implements the Transport interface to establish connections to servers using Spectral. It maintains a single connection per server, optimizing dialing times and reducing connection overhead. By leveraging streams for individual server connections, it enhances overall performance and resource utilization.

func NewSpectral added in v0.0.29

func NewSpectral(logger *slog.Logger) *Spectral

NewSpectral creates a new Spectral transport instance.

func (*Spectral) Dial added in v0.0.29

func (s *Spectral) Dial(ctx context.Context, addr string) (io.ReadWriteCloser, error)

Dial ...

type Transport

type Transport interface {
	// Dial initiates a connection to the specified address and returns an
	// io.ReadWriteCloser. The provided context is used for managing
	// timeouts and cancellations.
	Dial(ctx context.Context, addr string) (io.ReadWriteCloser, error)
}

Transport defines an interface for establishing server connections.

Jump to

Keyboard shortcuts

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