porcelain_state: Bind state into an endpoint

View source: R/state.R

porcelain_stateR Documentation

Bind state into an endpoint

Description

Bind state into an endpoint

Usage

porcelain_state(..., .state = list(...))

Arguments

...

Named arguments representing state to bind; see Details.

.state

A list of named state to bind, instead of using ... - this interface is considerably easier to program against if building an API programmatically, avoiding the use of do.call.

Details

This method allows state to be bound to the target function. Each element of ... (or .state) is named with the argument to the target function being bound, and the value is the value that argument will take. Once bound, the arguments to the target function may not be provided by an input.

The primary use case for this is to bind mutable state (database connections, etc) that may be shared amongst different endpoints within an API.


reside-ic/porcelain documentation built on March 4, 2024, 11:11 p.m.