class

PlaceOS::Driver::Proxy::RemoteDriver

Inherits Reference < Object

Constants

CORE_NAMESPACE = "core"

Constructors

new(sys_id : String, module_name : String, index : Int32, discovery : Clustering::Discovery = RemoteDriver.default_discovery, user_id : String | Nil = nil, &edge_id : String -> String)
Source
new(module_id : String, sys_id : String, module_name : String, index : Int32 = 1, discovery : Clustering::Discovery = RemoteDriver.default_discovery, user_id : String | Nil = nil, &edge_id : String -> String)
Source

Class methods

default_discovery
Source
get_parts(module_id : String | Symbol) : Tuple(String, Int32)

Extract module name and module id from string e.g. "Display_3" => {"Display", 3} "Display" => {"Display", 1} "My_Display" => {"My_Display", 1}

Source

Instance methods

[](status)
Source
[]?(status)
Source
debug(request_id : String | Nil = nil)

Returns a websocket that sends debugging logging to the remote Each message consists of an array [0, "message"] Easiest way to parse is: Tuple(Logger::Severity, String).from_json(%([0, "test"]))

Source
exec(security : Clearance, function : String, args = nil, named_args = nil, request_id : String | Nil = nil, user_id : String | Nil = @user_id) : Tuple(String, Int32)

Executes a request against the appropriate core and returns the JSON result

Source
function_present?(function : String) : Bool
Source
function_visible?(security : Clearance, function : String)
Source
index
Source
metadata
Source
metadata?
Source
module_id
Source
module_id?
Source
module_name
Source
status(klass, key)
Source
status
Source
status?(klass, key)
Source
subscribe(subscriptions : Proxy::Subscriptions, status, &callback : Driver::Subscriptions::IndirectSubscription, String -> Nil) : Driver::Subscriptions::IndirectSubscription

All subscriptions to external drivers should be indirect as the driver might be swapped into a completely different system - whilst we've looked up the id of this instance of a driver, it's expected that this object is short lived

Source
sys_id
Source
which_core(hash_id : String) : URI

Use consistent hashing to determine location of a resource

Source
which_core

Use consistent hashing to determine the location of the module

Source

Nested types