Documentation ¶
Index ¶
- Variables
- func IsIPv6(addr string) bool
- func PathToSocket() string
- type Client
- func (c *Client) Dialer(ctx context.Context, slug string) (d Dialer, err error)
- func (c *Client) Establish(ctx context.Context, slug string) (res *EstablishResponse, err error)
- func (c *Client) Instances(ctx context.Context, org *api.Organization, app string) (instances Instances, err error)
- func (c *Client) Kill(ctx context.Context) error
- func (c *Client) Ping(ctx context.Context) (res PingResponse, err error)
- func (c *Client) Probe(ctx context.Context, slug string) error
- func (c *Client) Resolve(ctx context.Context, slug, host string) (addr string, err error)
- func (c *Client) WaitForHost(parent context.Context, slug, host string) (err error)
- func (c *Client) WaitForTunnel(parent context.Context, slug string) (err error)
- type Dialer
- type EstablishResponse
- type Instances
- type PingResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoSuchHost = errors.New("no such host") )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Establish ¶ added in v0.0.233
Establish starts the daemon, if necessary, and returns a client to it.
func (*Client) WaitForHost ¶ added in v0.0.233
WaitForHost waits for a tunnel to the given host of the given org slug to become available in the next four minutes.
type Dialer ¶
type Dialer interface { State() *wg.WireGuardState Config() *wg.Config DialContext(ctx context.Context, network, addr string) (net.Conn, error) }
TODO: refactor to struct
type EstablishResponse ¶ added in v0.0.240
type EstablishResponse struct { WireGuardState *wg.WireGuardState TunnelConfig *wg.Config }
Click to show internal directories.
Click to hide internal directories.