This topic describes the concepts used to develop functions. The following table describes the concepts used in function development.
When you use Function Compute to compile an application, you must define a function as the entry to the application. Function Compute executes the application beginning from the function entry.
Function entries can be divided into two types: handler function entry and initializer function entry.
- Handler function entry (required): When you use Function Compute to compile an application, you must define a function as the entry to the application. Function Compute executes the application beginning from the function entry.
- Initializer function entry (optional): You can define an initializer interface to implement the initialization logic if you separate the initialization logic from the handler logic. Function Compute executes the initializer function first. After the initializer function is executed, Function Compute executes handler functions.
The handler function interface provided by Function Compute contains two parameters: event and context. The event parameter serves as the input parameter of the function. The context parameter stores the runtime information generated by Function Compute. The initializer interface contains only the context parameter.
For more information about function parameters, see Function parameters.
Logs are an important tool for function debugging and troubleshooting. You can configure a Logstores for each function to record function logs.
For more information about configuring Logstores and viewing logs, see Function logs.
The runtime environment of Function Compute provides many built-in dependencies. For more information, see Programming model. If a function requires a third-party dependency, you must compress the dependency together with the function code, then upload the compressed package to Function Compute.
For more information, see Install third-party dependencies.
Contact Alibaba Cloud technical support personnel if you have any questions.