Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Dec 21, 2023
1 parent 52c6d05 commit d7ad4c4
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 50 deletions.
19 changes: 11 additions & 8 deletions R/daemons.R
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,22 @@
#' # Reset to zero
#' daemons(0)
#'
#' }
#'
#' \dontrun{
#' # Launch 2 daemons on remotes 'nodeone' and 'nodetwo' using SSH
#' # connecting back directly to the host URL over a TLS connection:
#' #
#' # daemons(url = host_url(tls = TRUE),
#' # remote = ssh_config(c('ssh://nodeone', 'ssh://nodetwo')),
#' # dispatcher = FALSE)
#'
#' daemons(url = host_url(tls = TRUE),
#' remote = ssh_config(c('ssh://nodeone', 'ssh://nodetwo')),
#' dispatcher = FALSE)
#'
#' # Launch 4 daemons on the remote machine 10.75.32.90 using SSH tunnelling
#' # over port 5555 ('url' hostname must be 'localhost' or '127.0.0.1'):
#' #
#' # daemons(n = 4,
#' # url = 'ws://localhost:5555',
#' # remote = ssh_config('ssh://10.75.32.90', tunnel = TRUE))
#'
#' daemons(n = 4,
#' url = 'ws://localhost:5555',
#' remote = ssh_config('ssh://10.75.32.90', tunnel = TRUE))
#'
#' }
#'
Expand Down
37 changes: 20 additions & 17 deletions R/launchers.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,28 +250,31 @@ remote_config <- function(command = NULL, args = c("", "."), rscript = "Rscript"
#' @examples
#' ssh_config(remotes = c("ssh://10.75.32.90:222", "ssh://nodename"), timeout = 10)
#'
#' \dontrun{
#'
#' # launch 2 daemons on the remote machines 10.75.32.90 and 10.75.32.91 using
#' # SSH, connecting back directly to the host URL over a TLS connection:
#' #
#' # daemons(
#' # url = host_url(tls = TRUE),
#' # remote = ssh_config(
#' # remotes = c("ssh://10.75.32.90:222", "ssh://10.75.32.91:222"),
#' # timeout = 1
#' # )
#' # )
#'
#' daemons(
#' url = host_url(tls = TRUE),
#' remote = ssh_config(
#' remotes = c("ssh://10.75.32.90:222", "ssh://10.75.32.91:222"),
#' timeout = 1
#' )
#' )
#'
#' # launch 2 nodes on the remote machine 10.75.32.90 using SSH tunnelling over
#' # port 5555 ('url' hostname must be 'localhost' or '127.0.0.1'):
#' #
#' # make_cluster(
#' # url = "tcp://localhost:5555",
#' # remote = ssh_config(
#' # remotes = c("ssh://10.75.32.90", "ssh://10.75.32.90"),
#' # timeout = 1,
#' # tunnel = TRUE
#' # )
#' # )
#'
#' cl <- make_cluster(
#' url = "tcp://localhost:5555",
#' remote = ssh_config(
#' remotes = c("ssh://10.75.32.90", "ssh://10.75.32.90"),
#' timeout = 1,
#' tunnel = TRUE
#' )
#' )
#' }
#'
#' @rdname remote_config
#' @export
Expand Down
19 changes: 11 additions & 8 deletions man/daemons.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 20 additions & 17 deletions man/remote_config.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d7ad4c4

Please sign in to comment.