Represents a stateful abstraction for a Remote Config server template.
Signature:
export interface ServerTemplate
Methods
Method | Description |
---|---|
evaluate(context) | Evaluates the current template to produce a ServerConfig. |
load() | Fetches and caches the current active version of the project's ServerTemplate. |
set(template) | Sets and caches a ServerTemplateData or a JSON string representing the server template |
toJSON() | Returns a JSON representation of ServerTemplateData |
ServerTemplate.evaluate()
Evaluates the current template to produce a ServerConfig.
Signature:
evaluate(context?: EvaluationContext): ServerConfig;
Parameters
Parameter | Type | Description |
---|---|---|
context | EvaluationContext |
Returns:
ServerTemplate.load()
Fetches and caches the current active version of the project's ServerTemplate.
Signature:
load(): Promise<void>;
Returns:
Promise<void>
ServerTemplate.set()
Sets and caches a ServerTemplateData or a JSON string representing the server template
Signature:
set(template: ServerTemplateDataType): void;
Parameters
Parameter | Type | Description |
---|---|---|
template | ServerTemplateDataType |
Returns:
void
ServerTemplate.toJSON()
Returns a JSON representation of ServerTemplateData
Signature:
toJSON(): ServerTemplateData;
Returns: