class

Sellia::CLI::TunnelClient

Inherits Reference / Object

TunnelClient manages a WebSocket connection to the tunnel server and forwards incoming requests to a local service.

Constants

Log = ::Log.for(self)

Constructors

new(server_url : String, local_port : Int32, api_key : String | Nil = nil, local_host : String = "localhost", subdomain : String | Nil = nil, auth : String | Nil = nil, request_store : RequestStore | Nil = nil)
Source

Instance methods

api_key
Source
api_key=(api_key : String | Nil)
Source
auth
Source
auth=(auth : String | Nil)
Source
authenticated
Source
auto_reconnect

Auto-reconnect settings

Source
auto_reconnect=(auto_reconnect : Bool)

Auto-reconnect settings

Source
connected
Source
local_host
Source
local_host=(local_host : String)
Source
local_port
Source
local_port=(local_port : Int32)
Source
max_reconnect_attempts
Source
max_reconnect_attempts=(max_reconnect_attempts : Int32)
Source
on_connect

Set callback for when tunnel is connected and ready

Source
on_disconnect

Set callback for disconnection

Source
on_error

Set callback for errors

Source
on_request

Set callback for each incoming request

Source
public_url

State

Source
public_url=(public_url : String | Nil)

State

Source
reconnect_delay
Source
reconnect_delay=(reconnect_delay : Time::Span)
Source
request_store

Request store for inspector (optional)

Source
request_store=(request_store : RequestStore | Nil)

Request store for inspector (optional)

Source
running?

Returns true if the client is currently running (may be reconnecting)

Source
server_url

Configuration

Source
server_url=(server_url : String)

Configuration

Source
start

Start the tunnel client - connects and begins processing

Source
stop

Stop the tunnel client and close connection

Source
subdomain
Source
subdomain=(subdomain : String | Nil)
Source
tunnel_id
Source
tunnel_id=(tunnel_id : String | Nil)
Source