Description Usage Arguments Details See Also Examples
View source: R/set_connection.R
The function overrides the connection parameters for the duration of the current R session without changing the configuration file.
1 2 |
url |
Optional string argument. The url of ATSD with the port number. |
user |
Optional string argument. The user name. |
password |
Optional string argument. The user's password. |
verify |
Optional string argument – "yes" or "no".
|
encryption |
Optional string argument. Cryptographic protocol used by ATSD https server. Possible values are: "default", "ssl2", "ssl3", and "tls1" (In most cases, use "ssl3" or "tls1".) |
file |
Optional string argument. The absolute path to the file from which the connection parameters could be read. The file should be formatted as the package configuration file, see the Details section below. |
The function overrides the connection parameters for the duration of the current R session without changing the configuration file. If called without arguments the function sets the connection parameters from the configuration file. If the file argument is provided the function use it. In both cases the current values of the parameters became the same as in the file. The file should be a plain text file formatted as the following:
# the url of ATSD including port number
url=http://host_name:port_number
# the user name
user=atsd_user_name
# the user's password
password=atsd_user_password
# validate ATSD SSL certificate: yes, no
verify=no
# cryptographic protocol used by ATSD https server:
# default, ssl2, ssl3, tls1
encryption=ssl3
In case the file
argument is not provided, but some of other arguments are specified,
the only specified parameters will be changed.
To see the current values of the connection parameters use
the show_connection
function.
To change the configuration file use
the save_connection
function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Modify the user
set_connection(user = "user001")
# Modify the cryptographic protocol
set_connection(encryption = "tls1")
# Set up url, user and password
set_connection(url = "http://my.company.com:8088", user = "user001", password = "123456")
# Set up parameters of https connection
set_connection(url = "https://my.company.com:8443", user = "user001", password = "123456",
verify = "no", encryption = "ssl3")
## Not run:
# Set up parameters from a file
set_connection(file = "/home/user001/atsd_https_connection.txt")
# Set up parameters from the configuration file
set_connection()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.