flux_shell_mustache_render(3)
SYNOPSIS
#include <flux/shell.h>
char *flux_shell_mustache_render (flux_shell_t *shell,
const char *fmt);
char *flux_shell_rank_mustache_render (flux_shell_t *shell,
int shell_rank,
const char *fmt);
char *flux_shell_task_mustache_render (flux_shell_t *shell,
flux_shell_task_t *task,
const char *fmt);
DESCRIPTION
flux_shell_mustache_render() expands mustache templates in fmt
using the current shell context and returns an allocated string with the
result. The caller must free the result.
flux_shell_rank_mustache_render() is similar but renders the template
for an alternate shell rank specified by shell_rank.
flux_shell_task_mustache_render() renders the template for a specific
task specified by task.
These functions are useful for expanding job-specific templates in environment variables, command arguments, or plugin configurations.
RETURN VALUE
These functions return an allocated string on success which the caller must
free, or NULL on failure with errno set.
ERRORS
- EINVAL
shell,fmt, ortaskis NULL.- ENOMEM
Out of memory.
RESOURCES
Flux: http://flux-framework.org
Flux RFC: https://flux-framework.readthedocs.io/projects/flux-rfc
Issue Tracker: https://github.com/flux-framework/flux-core/issues