class

PlaceOS::Edge::Client

Inherits PlaceOS::Core::ProcessManager::Common < Reference < Object

Constants

Log = ::Log.for(self)
WEBSOCKET_API_PATH = "/api/engine/v2/edges/control"

Constructors

new(uri : URI = PLACE_URI, secret : String | Nil = nil, sequence_id : UInt64 = 0, skip_handshake : Bool = false, ping : Bool = true, store : PlaceOS::Core::DriverStore = Core::DriverStore.new)
Source

Instance methods

add_binary(key : String, binary : IO)
Source
attempt_download(loaded_channel, key)
Source
connect(initial_socket : HTTP::WebSocket | Nil = nil, &)

Initialize the WebSocket API

Optionally accepts a block called after connection has been established.

Source
connect(initial_socket : HTTP::WebSocket | Nil = nil)

Initialize the WebSocket API

Optionally accepts a block called after connection has been established.

Source
debug(module_id : String)
Source
disconnect
Source
drivers

List the driver binaries present on this client

Source
fetch_binary(key : String) : IO | Nil
Source
forward_debug_message(module_id, message)
Source
handle_request(sequence_id : UInt64, request : Protocol::Server::Request)
Source
handshake
Source
host
Source
ignore(module_id : String)
Source
load(module_id, driver_key)

Check for binary, request if it's not present Start the module with redis hooks

Source
load_binaries(binaries : Array(String))

Kicks off downloading all the binaries

Source
load_binary(key : String) : Channel(Nil) | Nil

Load binary, first checking if present locally then fetch from core

Source
modules

List the modules running on this client

Source
on_redis(action : Protocol::RedisAction, hash_id : String, key_name : String, status_value : String | Nil)

Proxy a redis action via Core

Source
on_setting(module_id : String, setting_name : String, setting_value : String)

Proxy a settings write via Core

Source
queue_start(module_id : String, payload : String)
Source
remove_binary(key : String)
Source