crew_class_client | R Documentation |
R6
client class.R6
class for mirai
clients.
See crew_client()
.
host
See crew_client()
.
port
See crew_client()
.
tls
See crew_client()
.
serialization
See crew_client()
.
seconds_interval
See crew_client()
.
seconds_timeout
See crew_client()
.
relay
Relay object for event-driven programming on a downstream condition variable.
started
Whether the client is started.
url
Client websocket URL.
profile
Compute profile of the client.
condition
Condition variable of the client.
client
Process ID of the local process running the client.
dispatcher
Process ID of the mirai
dispatcher
new()
mirai
client constructor.
crew_class_client$new( host = NULL, port = NULL, tls = NULL, serialization = NULL, seconds_interval = NULL, seconds_timeout = NULL, relay = NULL )
host
Argument passed from crew_client()
.
port
Argument passed from crew_client()
.
tls
Argument passed from crew_client()
.
serialization
Argument passed from crew_client()
.
seconds_interval
Argument passed from crew_client()
.
seconds_timeout
Argument passed from crew_client()
.
relay
Argument passed from crew_client()
.
An R6
object with the client.
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) { client <- crew_client() client$start() client$log() client$terminate() }
validate()
Validate the client.
crew_class_client$validate()
NULL
(invisibly).
set_started()
Register the client as started.
crew_class_client$set_started()
Exported to implement the sequential controller. Only meant to be called manually inside the client or the sequential controller.
NULL
(invisibly).
start()
Start listening for workers on the available sockets.
crew_class_client$start()
NULL
(invisibly).
terminate()
Stop the mirai client and disconnect from the worker websockets.
crew_class_client$terminate()
NULL
(invisibly).
resolved()
Get the true value of the nanonext
condition variable.
crew_class_client$resolved()
The value of the nanonext
condition variable.
status()
Internal function:
return the mirai
status of the compute profile.
crew_class_client$status()
Should only be called by the launcher, never by the user.
The returned events
field changes on every call and must be
interpreted by the launcher before it vanishes.
A list with status information.
pids()
Get the process IDs of the local process and the
mirai
dispatcher (if started).
crew_class_client$pids()
An integer vector of process IDs of the local process and the
mirai
dispatcher (if started).
Other client:
crew_client()
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
client <- crew_client()
client$start()
client$log()
client$terminate()
}
## ------------------------------------------------
## Method `crew_class_client$new`
## ------------------------------------------------
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
client <- crew_client()
client$start()
client$log()
client$terminate()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.