你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

extension_meta Module

Classes

ExtensionMeta

The metaclass handles extension registration.

AppExtension is registered in init, it is applied to all triggers. FuncExtension is registered in call, as users need to instantiate it inside hook script.

After registration, the extension class will be flatten into the following structure to speed up worker lookup:

_func_exts[<trigger_name>].<hook_name>.(ext_name, ext_impl) (e.g. _func_exts['HttpTrigger'].pre_invocation.ext_impl)

_app_exts.<hook_name>.(ext_name, ext_impl) (e.g. _app_exts.pre_invocation_app_level.ext_impl)

The extension tree information is stored in _info for diagnostic purpose. The dictionary is serializable to json:

_info['FuncExtension'][''] = list() _info['AppExtension'] = list()

Executes on 'import extension', once the AppExtension class is loaded, call the setup() method and add the life-cycle hooks into _app_exts.