source(file.path(usethis::proj_get(), "vignettes",  "_common.R"))
path <<- "."
name <<- "repository"
file_fs <- system.file("inst", "configurations", "fs.yml", package = "microservices", mustWork = TRUE)
info <- config::get("add_plumber_service", file=file_fs)
microservice <- list(files = info$files, dependencies = as.data.frame(info$dependencies))
microservice$files$add <- sapply(microservice$files$add, glue::glue, route_name = name)

Lay the infrastructure for an additional set of services. That includes adding a unit test, adding an endpoint, and extending the entrypointy.

warning("`add_plumber_service` adds a service to pre-existing plumber microservice which you could deploy by calling `use_plumber_microservice`.")

How It Works

Given a path ("r path") to a folder and a name ("r name")

When add_plumber_service is called

Then the function creates the following files:


And updates the following files:


When to Use

In scenarios where services are thematically linked to each other. Examples for themes that should be mounted separately:



harell/microservices documentation built on March 2, 2021, 3:15 a.m.