Azure 函数主机 运行 配置 - 运行 所有函数
Azure functions host run configuration - run all functions
我是 .NET 和 Azure 的新手。
我有一个 Azure 函数应用程序,我 运行 从我的 Rider IDE 本地获得。我附上了我的 运行 配置的屏幕截图。
它 运行 成功,但需要我指定哪些“运行 的功能”(屏幕截图中的红色条)。如果我不指定任何功能它 运行s none。我想要的是 运行 所有功能,因为我无法在那里提供所有功能(它是一个巨大的变化列表)。
谢谢
Azure Functions 是在特定触发器发生时执行的代码片段。这可以是 HTTP 请求、队列中的消息、在特定容器中创建的 blob 或基于 cron 表达式的计时器。
这意味着当 Functions 运行时为 运行、所有 Functions 都准备好在它们的触发发生后立即运行。
为了测试目的触发函数的执行有几个选项。您可以通过调用 URL、在队列中添加消息、在容器中创建 blob 或将定时器触发器配置为 RunOnStartup(请注意这是 不建议投入生产。
另一种选择是使用可用的管理员URL。
In some contexts, you may need to run "on-demand" an Azure Function that is indirectly triggered. Examples of indirect triggers include functions on a schedule or functions that run as the result of another resource's action.
和
To run a non HTTP-triggered function, you need a way to send a request to Azure to run the function. The URL used to make this request takes a specific form.
在Azure中调用adminURL时,需要指定Function的master key,但是
When running locally, the function's master key is not required. You can directly call the function omitting the x-functions-key
header.
来源:Manually run a non HTTP-triggered function
编辑:
如果在工程目录下手动启动运行func start
函数,则所有Function都会启动。为此,请确保安装了 Azure Functions Core Tools。
Azure Functions Core Tools lets you develop and test your functions on your local computer from the command prompt or terminal. Your local functions can connect to live Azure services, and you can debug your functions on your local computer using the full Functions runtime. You can even deploy a function app to your Azure subscription.
更多信息:Work with Azure Functions Core Tools
特别有趣:章节 Run functions locally。
To run a Functions project, you run the Functions host from the root directory of your project. The host enables triggers for all functions in the project. The start command varies depending on your project language.
编辑 2:
作为评论添加如下:当 运行 Azure Functions 来自与 Visual Studio 不同的 IDE 时,例如 JetBrains 的 Rider,请确保工作目录设置为Functions 项目的根目录.
我是 .NET 和 Azure 的新手。 我有一个 Azure 函数应用程序,我 运行 从我的 Rider IDE 本地获得。我附上了我的 运行 配置的屏幕截图。 它 运行 成功,但需要我指定哪些“运行 的功能”(屏幕截图中的红色条)。如果我不指定任何功能它 运行s none。我想要的是 运行 所有功能,因为我无法在那里提供所有功能(它是一个巨大的变化列表)。 谢谢
Azure Functions 是在特定触发器发生时执行的代码片段。这可以是 HTTP 请求、队列中的消息、在特定容器中创建的 blob 或基于 cron 表达式的计时器。
这意味着当 Functions 运行时为 运行、所有 Functions 都准备好在它们的触发发生后立即运行。
为了测试目的触发函数的执行有几个选项。您可以通过调用 URL、在队列中添加消息、在容器中创建 blob 或将定时器触发器配置为 RunOnStartup(请注意这是 不建议投入生产。
另一种选择是使用可用的管理员URL。
In some contexts, you may need to run "on-demand" an Azure Function that is indirectly triggered. Examples of indirect triggers include functions on a schedule or functions that run as the result of another resource's action.
和
To run a non HTTP-triggered function, you need a way to send a request to Azure to run the function. The URL used to make this request takes a specific form.
在Azure中调用adminURL时,需要指定Function的master key,但是
When running locally, the function's master key is not required. You can directly call the function omitting the
x-functions-key
header.
来源:Manually run a non HTTP-triggered function
编辑:
如果在工程目录下手动启动运行func start
函数,则所有Function都会启动。为此,请确保安装了 Azure Functions Core Tools。
Azure Functions Core Tools lets you develop and test your functions on your local computer from the command prompt or terminal. Your local functions can connect to live Azure services, and you can debug your functions on your local computer using the full Functions runtime. You can even deploy a function app to your Azure subscription.
更多信息:Work with Azure Functions Core Tools
特别有趣:章节 Run functions locally。
To run a Functions project, you run the Functions host from the root directory of your project. The host enables triggers for all functions in the project. The start command varies depending on your project language.
编辑 2:
作为评论添加如下:当 运行 Azure Functions 来自与 Visual Studio 不同的 IDE 时,例如 JetBrains 的 Rider,请确保工作目录设置为Functions 项目的根目录.