Azure Functions come with a fixed set of pre-existing bindings.
At the same time, Azure Functions are based on Web Jobs SDK, which have some extensibility story. It enables creating custom binding types, including custom triggers.
Is it possible to run those custom bindings in Azure Function runtime? If yes, is there a tutorial or documentation on how to do that? If no, any plans to?
Some sample usage scenario would be integrating to non-Azure products (e.g. Kafka) or custom in-house protocols.
Binding to a function is a way of declaratively connecting another resource to the function; bindings may be connected as input bindings, output bindings, or both. Data from bindings is provided to the function as parameters. You can mix and match different bindings to suit your needs.
Unlike a trigger, a function can have multiple input and output bindings.
Follow the below steps o create custom handlers for Azure functions: Step 1: Let's first create a local function. Pick a folder, and for the language, we'll pick a custom handler, which can be implemented in any language that supports HTTP calls. Step 2: Next, we use the HTTP trigger, and we'll call it “Go Example.”
The function. json file defines the function's trigger, bindings, and other configuration settings. Every function has one and only one trigger. The runtime uses this config file to determine the events to monitor and how to pass data into and return data from a function execution.
Custom input and output bindings are now fully supported. More information can be found on the Azure WebJobs wiki: https://github.com/Azure/azure-webjobs-sdk/wiki/Creating-custom-input-and-output-bindings
This wiki describes how to define a custom binding extension for the WebJobs SDK. These same extensions can be used, without modification, in Azure Functions.
A sample binding which writes to a Slack channel be found here: https://github.com/lindydonna/SlackOutputBinding
We have a preview of 'Bring Your Own Binding' feature'. See Extensibility for more details on the feature and WebJobsExtensionSamples for sample and docs. Also, you can track the feature here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With