class

PlaceOS::Core::Client

Inherits Responsible < Reference < Object

Constants

BASE_PATH = "/api/core"

Core base

CORE_VERSION = "v1"

Constructors

new(uri : URI, request_id : String | Nil = nil, core_version : String = CORE_VERSION, retries : Int32 = 10)
Source
new(host : String | Nil = nil, port : Int32 | Nil = nil, request_id : String | Nil = nil, core_version : String = CORE_VERSION, retries : Int32 = 10)
Source

Class methods

client(uri : URI, request_id : String | Nil = nil, core_version : String = CORE_VERSION, retries : Int32 = 10, &)

A one-shot Core client

Source

Instance methods

branches?(repository : String) : Array(String) | Nil
Source
cancel_job(job : String)
Source
cleanup_edge_errors(hours : Int32 = 24) : Hash(String, JSON::Any)

Trigger error cleanup for edges

Source
close
Source
core_load

Details about machine load

Source
core_status

Core status

Source
core_version
Source
debug(module_id : String, &block : String -> ) : Nil

Grab the STDOUT of a module process

Sets up a websocket connection with core, and forwards messages to captured block

Source
debug(module_id : String) : HTTP::WebSocket
Source
driver(driver_id : String, repository : String, branch : String, count : Int32 | Nil = nil) : Array(DriverCommit)

Returns the commits for a particular driver

Source
driver_compiled?(file_name : String, commit : String, repository : String, tag : String) : Bool
Source
driver_details(file_name : String, commit : String, repository : String, branch : String = "master") : String

Returns the metadata for a particular driver

Source
driver_recompile(file_name : String, commit : String, repository : String, tag : String)
Source
driver_reload(driver_id : String)
Source
driver_status(path : String) : DriverStatus

Driver status

Source
drivers(repository : String) : Array(String)

Returns drivers available

Source
edge_errors(edge_id : String, limit : Int32 | Nil = nil, type : String | Nil = nil) : Array(EdgeError)

Get errors for a specific edge

Source
edge_module_status(edge_id : String) : EdgeModuleStatus

Get module status for a specific edge

Source
edge_monitoring_summary

Get real-time error summary

Source
edges_connections

Get connection metrics for all edges

Source
edges_errors(limit : Int32 | Nil = nil, type : String | Nil = nil) : Hash(String, Array(EdgeError))

Get errors from all edges

Source
edges_health

Get health status for all edges

Source
edges_module_failures

Get module failures from all edges

Source
edges_statistics

Get overall edge statistics

Source
execute(module_id : String, method : String | Symbol, arguments = [] of JSON::Any, user_id : String | Nil = nil)

Returns the JSON response of executing a method on module

Source
host
Source
load(module_id : String)
Source
loaded

Returns the loaded modules on the node

Source
monitor_jobs(state : State = State::Pending)
Source
port
Source
request_id

Set the request_id on the client

Source
request_id=(request_id : String | Nil)

Set the request_id on the client

Source
terminate(path : String) : Bool
Source
version
Source

Nested types