Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AGCFunctionCallable

en

Calls a cloud function that has been set or sets a timeout interval for it.

zh

设置需要调用的云函数后,可以通过此类的方法调用云函数或设置超时时间。

Hierarchy

  • AGCFunctionBaseService
    • AGCFunctionCallable

Index

Methods

call

  • en

    Calls a function.

    zh

    调用函数。

    Parameters

    • cb: FunctionCallback

      Callback of function

    • Default value param: {} = {}

      Custom object that contains input parameter values of the function, which can be of Object type. The sequence of the input parameter values contained in the object must be the same as that of the input parameters set during cloud function creation.

    Returns void

clone

  • en

    Creates a AGCFunctionCallable instance with a specified timeout interval.

    zh

    创建一个 AGCFunctionCallable 实例,使用指定的超时时间。

    Parameters

    • timeout: number

      Timeout interval of a function. The unit is defined by the units parameter.

    • Default value timeUnit: TimeUnit = TimeUnit.MILLISECONDS

      TimeUnit object defining the time unit.

    Returns AGCFunctionCallable

    Returns the newly created AGCFunctionCallable object.

getTimeout

  • getTimeout(): number
  • en

    Obtains the timeout interval of a function.

    zh

    获取函数执行的超时时间。

    Returns number

    Returns the timeout interval of a function. You can customize the unit of the timeout interval.

setTimeout

  • en

    Sets a timeout interval of a function.

    zh

    设置函数执行的超时时间。

    Parameters

    • timeout: number

      Timeout interval of a function. The unit is defined by the units parameter.

    • Default value timeUnit: TimeUnit = TimeUnit.MILLISECONDS

      TimeUnit object defining the time unit.

    Returns AGCFunctionCallable

    Returns a AGCFunctionCallable instance that can be used to call a function.

Static callStaticMethod

  • callStaticMethod(...args: (number | boolean | String)[]): any
  • Parameters

    • Rest ...args: (number | boolean | String)[]

    Returns any

Generated using TypeDoc