class Obsctl::TUI::Session

Overview

Stateful TUI application session that talks to a SessionClient.

Defined in:

obsctl/tui/session.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Config::Config, config_path : String, client_factory : Proc(Config::Config, SessionClient) = ->(config : Config::Config) do (IpcSessionClient.new(IPC::UnixClient.new(IPC::SocketPath.resolve(config.server.socket_path)))).as(SessionClient) end) #

[View source]

Instance Method Detail

def close : Nil #

Closes the current session client.


[View source]
def config : Obsctl::Config::Config #

[View source]
def execute(command : Domain::Command) : SessionResult #

Executes an already parsed command.


[View source]
def execute_line(line : String) : SessionResult #

Parses and executes one command-palette line.


[View source]
def poll_events : Model #

Drains pushed server state/events/logs and performs scheduled reconnects.


[View source]
def start : Model #

Connects the session client and returns the initial model.


[View source]