class PlaceOS::Driver::Proxy::RemoteDriver
Defined in:
placeos-driver/proxy/remote_driver.crConstant Summary
-
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)
- .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)
Class Method Summary
- .default_discovery : Clustering::Discovery
-
.get_parts(module_id : String | Symbol) : Tuple(String, Int32)
Extract module name and module id from string e.g.
Instance Method Summary
- #[](status)
- #[]?(status)
-
#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"]))
-
#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
- #function_present?(function : String) : Bool
- #function_visible?(security : Clearance, function : String)
- #index : Int32
- #metadata : DriverModel::Metadata | Nil
- #metadata? : DriverModel::Metadata | Nil
- #module_id : String | Nil
- #module_id? : String | Nil
- #module_name : String
- #status(klass, key)
- #status : RedisStorage
- #status?(klass, key)
-
#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
- #sys_id : String
-
#which_core(hash_id : String) : URI
Use consistent hashing to determine location of a resource
-
#which_core : URI
Use consistent hashing to determine the location of the module
Constructor Detail
Class Method Detail
Extract module name and module id from string e.g. "Display_3" => {"Display", 3} "Display" => {"Display", 1} "My_Display" => {"My_Display", 1}
Instance Method Detail
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"]))
Executes a request against the appropriate core and returns the JSON result
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