Make a toxiproxyy client. This must be done before accessing the toxiproxy server. The default for arguments are controlled by environment variables (see Details) and values provided as arguments override these defaults.
toxiproxy_client(addr = NULL)
| addr | The value address including protocol and port,
e.g., |
|---|
apiReturns an api client object that can be used to directly interact with the toxiproxy server.
Usage:api()
server_versionReturns the server version as a numeric_version object.
Usage:server_version(refresh = FALSE)
Arguments:
refresh: Logical scalar indicating if the value should be refreshed from the server if it has already been retrieved, as it is not expected to change.
listList information about all proxies on this server. Returns a data.frame.
Usage:list()
createCreate a new proxy.
Usage:create(name, upstream, listen = NULL, enabled = TRUE)
Arguments:
name: The name for the proxy
upstream: The address of the service to proxy. Can be given as a string in the format <host>:<port> or simply as a port number, in which case the host is assumed to be localhost.
listen: The address that the proxy should listen on. Can be given as a either a string in the format <host>:<port> or simply as a port, in which case the host will be set to the same host as the toxiproxy server (which is almost always what you want!). If omitted, the toxiproxy server will choose a random free port.
enabled: Logical scalar indicating if the proxy should be enabled after creation.
toxiproxy_proxy object - see the help there for details of methods that can be used with that object.resetEnable all proxies and remove all toxics.
Usage:reset()
getGet an existing proxy
Usage:get(name)
Arguments:
name: The name of the proxy to get
toxiproxy_proxy object - see the help there for details of methods that can be used with that object.removeRemove a proxy
Usage:remove(name)
Arguments:
name: The name of the proxy to remove