R6
class for mirai
clients.
Details
See crew_client()
.
See also
Other client:
crew_client()
Active bindings
host
See
crew_client()
.port
See
crew_client()
.tls
See
crew_client()
.serialization
See
crew_client()
.profile
Compute profile of the 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.
Methods
Method new()
mirai
client constructor.
Usage
crew_class_client$new(
host = NULL,
port = NULL,
tls = NULL,
serialization = NULL,
profile = NULL,
seconds_interval = NULL,
seconds_timeout = NULL,
relay = NULL
)
Arguments
host
Argument passed from
crew_client()
.port
Argument passed from
crew_client()
.tls
Argument passed from
crew_client()
.serialization
Argument passed from
crew_client()
.profile
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()
.
Examples
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
client <- crew_client()
client$start()
client$log()
client$terminate()
}
Method set_started()
Register the client as started.
Method start()
Start listening for workers on the available sockets.
Method status()
Get the counters from mirai::info()
.
Examples
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()
}