Compiler support: define and export FnConfig interface (#97)

This commit is contained in:
Pavel
2021-11-04 15:15:30 +03:00
committed by GitHub
parent 3ad6a41ed3
commit 337a3f45de
8 changed files with 49 additions and 37 deletions

View File

@ -188,6 +188,17 @@ interface ServiceDef {
functions: Array<FunctionBodyDef>;
}
/**
* Options to configure Aqua function execution
*/
export interface FnConfig {
/**
* Sets the TTL (time to live) for particle responsible for the function execution
* If the option is not set the default TTL from FluencePeer config is used
*/
ttl?: number;
}
/**
* Convenience function to support Aqua `func` generation backend
* The compiler only need to generate a call the function and provide the corresponding definitions and the air script
@ -437,7 +448,7 @@ const extractFunctionArgs = (
numberOfExpectedArgs: number,
): {
peer: FluencePeer;
config?: { ttl?: number };
config?: FnConfig;
args: any[];
} => {
let peer: FluencePeer;