client

package
v0.2.28 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 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 Dialer

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

func New

func New() *Dialer

func (*Dialer) Dial

func (d *Dialer) Dial(Context context.Context, URL *url.URL) (net.Conn, error)

Dial creates a connection to a channel with "URL". This URL can be a URL from a discovery server, or a protocol registered in `RegisterProtocol`.

func (*Dialer) RegisterProtocol

func (d *Dialer) RegisterProtocol(Name string, Protocol Protocol)

RegisterProtocol registers a protocol handler in the dialer.

type DialerContext

type DialerContext interface {
	DialContext(context.Context, string, string) (net.Conn, error)
}

type DiscoveryConfig

type DiscoveryConfig struct {
	UnderlyingDialer *Dialer

	ProbeTimeout time.Duration
	// contains filtered or unexported fields
}

type Protocol

type Protocol interface {
	DialContext(context.Context, *url.URL) (net.Conn, error)
}

func DiscoveryProtocol

func DiscoveryProtocol(TransportProtocol string, Config *DiscoveryConfig) Protocol

func NetDialerProtocol

func NetDialerProtocol(network string, dialer DialerContext) Protocol

Jump to

Keyboard shortcuts

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