addManagedWorkerHandles {ManagedCloudProvider}R Documentation

Add or get the worker container handles to the managed cloud provider

Description

Add or get the worker container handles to the managed cloud provider. The handles can be duplicated if multiple workers share the same container

Usage

addManagedWorkerHandles(provider, handles)

getManagedWorkerHandles(provider)

Arguments

provider

A ManagedCloudProvider object

handles

the worker container handles

Value

addManagedWorkerHandles: No return value getManagedWorkerHandles: A character vector of the worker handles

Examples

## make a dummy provider
DummyProvider <- setRefClass("DummyProvider", contains = "ManagedCloudProvider")
provider <- DummyProvider()

## No worker handle in the provider
getManagedWorkerHandles(provider)

## Add worker handles
addManagedWorkerHandles(provider, c("a", "b"))
getManagedWorkerHandles(provider)

## It is possible to add the same handle
## if multiple workers share the same container
addManagedWorkerHandles(provider, c("a"))
getManagedWorkerHandles(provider)

[Package ManagedCloudProvider version 1.0.0 Index]