Learn R Programming

crew (version 0.5.0)

crew_client: Create a client object.

Description

Create an R6 wrapper object to manage the mirai client.

Usage

crew_client(
  name = NULL,
  workers = 1L,
  host = NULL,
  port = NULL,
  tls = crew::crew_tls(),
  tls_enable = NULL,
  tls_config = NULL,
  seconds_interval = 0.25,
  seconds_timeout = 10
)

Arguments

name

Name of the client object. If NULL, a name is automatically generated.

workers

Integer, maximum number of parallel workers to run.

host

IP address of the mirai client to send and receive tasks. If NULL, the host defaults to the local IP address.

port

TCP port to listen for the workers. If NULL, then an available ephemeral port is automatically chosen.

tls

A TLS configuration object from crew_tls().

tls_enable

Deprecated on 2023-09-15 in version 0.4.1. Use argument tls instead.

tls_config

Deprecated on 2023-09-15 in version 0.4.1. Use argument tls instead.

seconds_interval

Number of seconds between polling intervals waiting for certain internal synchronous operations to complete. If space_poll is TRUE, then this is also the minimum number of seconds between calls to mirai::daemons() for the purposes of checking worker status.

seconds_timeout

Number of seconds until timing out while waiting for certain synchronous operations to complete.

See Also

Other developer: crew_controller(), crew_launcher(), crew_schedule()

Examples

Run this code
if (identical(Sys.getenv("CREW_EXAMPLES"), "true")) {
client <- crew_client()
client$start()
client$log()
client$terminate()
}

Run the code above in your browser using DataLab