fabricsdial

package
v0.0.0-...-2c360f2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebSocketDialer

func NewWebSocketDialer(tr *http.Transport) *websocket.Dialer

NewWebSocketDialer creates a new WebSocket dialer from a http transport.

Types

type Dialer

type Dialer struct {
	Router          sniproxy.Router
	WebSocketDialer *websocket.Dialer
	TunnelOptions   *sniproxy.Options
}

Dialer dials to a HomeDrive Fabrics service.

func (*Dialer) Dial

func (d *Dialer) Dial(ctx context.Context) (*sniproxy.Endpoint, error)

Dial connects to a HomeDrive Fabrics service, and returns an SNI-proxy endpoint.

type SimpleRouter

type SimpleRouter struct {
	Host    string // Host to route to.
	User    string
	Key     []byte
	KeyFile string

	Transport http.RoundTripper
}

SimpleRouter provides a simple endpoint based router. It directly contacts the fabrics node for a token.

func (*SimpleRouter) Route

func (r *SimpleRouter) Route(ctx context.Context) (string, string, error)

Route returns the host and the token.

Jump to

Keyboard shortcuts

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