Methods for working with a particular docker service. Service
objects are returned by creating a docker service, or by using
$service$get
to fetch an existing service by name or id.
Below is reference documentation for all methods for version '1.29' of the docker API - other versions are available. This documentation is automatically generated from docker's API schema, and so inaccuracies may exist between it and stevedore's interface (especially references to JSON objects). Please report any documentation that might be improved at https://github.com/richfitz/stevedore/issues
help
Display help for this object
Usage:
Arguments:
help_type
: Passed to utils::help
, can be one of "text", "html" or "pdf" (or an abbreviation). By default it uses the value getOption("help_type")
and should follow the same behaviour as other R help (e.g., using "?")
id
Return the services's id
Usage:
id()
inspect
Return detailed information about this service. Similar to the cli command docker service inspect
.
Usage:
inspect(reload = TRUE)
Arguments:
reload
: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set to FALSE
after a service has been removed.
name
Return the service's name
Usage:
name(reload = TRUE)
Arguments:
reload
: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set to FALSE
after a service has been removed.
ps
Get summary information about a service. Similar to the cli command docker service ps
.
Usage:
ps(resolve_names = TRUE, filters = NULL)
Arguments:
resolve_names
: Resolve task and node names, from their ids? If FALSE
, rather than do this instead only print ids. Task "names" are constructed from a combination of service name (or id) and the replicate number.
filters
: A named character vector of filters to process on the tasks list. Available filters are the same as $task$list()
, except that service
is not accepted (it is used internally by this method). Useful filters include desired-state
, label
, node
, name
and id
.
reload
Refresh infomation on the service from the server, returning $inspect()
invisibly.
Usage:
reload()
service_delete
Delete a service. Similar to the cli command docker service rm
.
Usage:
service_delete()
tasks
Fetch tasks associated with this service. Returns a list of docker_task
objects
Usage:
tasks(filters = NULL)
Arguments:
filters
: A named character vector of filters to process on the tasks list. Available filters are the same as $task$list()
, except that service
is not accepted (it is used internally by this method). Useful filters include desired-state
, label
, node
, name
and id
.
version
Return the service's version. This is used by some other methods to avoid conflicting writes.
Usage:
version(reload = TRUE)
Arguments:
reload
: Logical scalar, indicating if the information should be refreshed from the daemon. This is useful to set to FALSE
after a service has been removed.
docker_service_collection
for other
service management methods.