class
Obsctl::TUI::Session
- Obsctl::TUI::Session
- Reference
- Object
Overview
Stateful TUI application session that talks to a SessionClient.
Defined in:
obsctl/tui/session.crConstructors
Instance Method Summary
-
#close : Nil
Closes the current session client.
- #config : Obsctl::Config::Config
-
#execute(command : Domain::Command) : SessionResult
Executes an already parsed command.
-
#execute_line(line : String) : SessionResult
Parses and executes one command-palette line.
-
#poll_events : Model
Drains pushed server state/events/logs and performs scheduled reconnects.
-
#start : Model
Connects the session client and returns the initial model.
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)
#
Instance Method Detail
Executes an already parsed command.
Drains pushed server state/events/logs and performs scheduled reconnects.