dialer

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Websocket    = `ws`
	WebsocketTls = `wss`
	Http         = `http`
	HttpTls      = `https`
	Basic        = `basic`
	BasicTls     = `basic+tls`
)

Variables

View Source
var ErrClosed = errors.New(`dialer already closed`)

Functions

This section is empty.

Types

type BasicDialer

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

func (*BasicDialer) Close

func (d *BasicDialer) Close() (e error)

func (*BasicDialer) Connect

func (d *BasicDialer) Connect(ctx context.Context) (conn *Conn, e error)

func (*BasicDialer) Info

func (d *BasicDialer) Info() any

func (*BasicDialer) Tag

func (d *BasicDialer) Tag() string

type Conn

type Conn struct {
	io.ReadWriteCloser
	// contains filtered or unexported fields
}

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() RemoteAddr

type Dialer

type Dialer interface {
	Tag() string
	Connect(ctx context.Context) (conn *Conn, e error)
	Close() (e error)
	Info() any
}

func New

func New(nk *network.Network, log *slog.Logger, pool *pool.Pool, opts *config.Dialer) (dialer Dialer, e error)

type HttpDialer

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

func (*HttpDialer) Close

func (d *HttpDialer) Close() (e error)

func (*HttpDialer) Connect

func (d *HttpDialer) Connect(ctx context.Context) (conn *Conn, e error)

func (*HttpDialer) Info

func (d *HttpDialer) Info() any

func (*HttpDialer) Tag

func (d *HttpDialer) Tag() string

type RemoteAddr

type RemoteAddr struct {
	Dialer  string
	Network string
	Addr    string
	Secure  bool
	URL     string
}

type WebsocketDialer

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

func (*WebsocketDialer) Close

func (d *WebsocketDialer) Close() (e error)

func (*WebsocketDialer) Connect

func (d *WebsocketDialer) Connect(ctx context.Context) (conn *Conn, e error)

func (*WebsocketDialer) Info

func (d *WebsocketDialer) Info() any

func (*WebsocketDialer) Tag

func (d *WebsocketDialer) Tag() string

Jump to

Keyboard shortcuts

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