cloudyr / aws.ec2metadata
Showing 1 of 1 files from the diff.

@@ -2,12 +2,11 @@
Loading
2 2
    strsplit(x, "\n")[[1]]
3 3
}
4 4
5 -
get_instance_metadata <- 
6 -
function(item,
7 -
         version = "latest",
8 -
         base_url = "http://169.254.169.254/", 
9 -
         parse = "text",
10 -
         ...) {
5 +
get_instance_metadata <- function(item,
6 +
                                  version = "latest",
7 +
                                  base_url = "http://169.254.169.254/", 
8 +
                                  parse = "text",
9 +
                                  ...) {
11 10
    if (!missing(item)) {
12 11
        uri <- paste0(base_url, version, "/", item)
13 12
    } else {
@@ -190,13 +189,13 @@
Loading
190 189
#' @export
191 190
is_ecs <- function() {
192 191
    container_relative <- Sys.getenv(ENV_CONTAINER_CREDS)
193 -
    return(!is.null(container_relative)&&(container_relative != ""))
192 +
    return(!is.null(container_relative) && (container_relative != ""))
194 193
}
195 194
196 195
#' @rdname ec2metadata
197 196
#' @param base_url Base URL for querying instance metadata
198 197
#' @export
199 -
ecs_metadata <- function(base_url="http://169.254.170.2") {
198 +
ecs_metadata <- function(base_url = "http://169.254.170.2") {
200 199
    container_relative <- Sys.getenv(ENV_CONTAINER_CREDS)
201 200
    uri <- paste0(base_url, container_relative)
202 201
    response <- try(curl::curl_fetch_memory(uri, handle = curl::new_handle(timeout_ms = 100)), silent = TRUE)
Files Coverage
R 29.03%
Project Totals (2 files) 29.03%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading