Class AzureRawFunction

All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, Feature, AzureCloudFeature, AzureMicronautRuntimeFeature, CloudFeature, FunctionFeature, MicronautRuntimeFeature

@Requires(property="micronaut.starter.feature.azure.function.enabled", value="true", defaultValue="true") @Singleton public class AzureRawFunction extends AbstractAzureFunction
Feature implementation for a raw Azure Function in Micronaut.

Provides configuration and setup for using Azure Functions without the HTTP abstraction, including dependency management, test generation, and integration with the Azure HTTP function feature.

  • Constructor Details

  • Method Details

    • processSelectedFeatures

      public void processSelectedFeatures(FeatureContext featureContext)
      Description copied from interface: Feature
      If this method is called for a given feature then that feature was explicitly selected or was included by default as a result of DefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set). This method can be implemented to allow features to modify the list of features that will apply to the project. The methods FeatureContext.addFeature(Feature) and FeatureContext.exclude(FeaturePredicate) are the primary ways to add and remove features from the context. FeatureContext.isPresent(Class) can be used to determine the existence of other features in order to make decisions.
      Parameters:
      featureContext - The feature context
    • applyTestTemplate

      protected void applyTestTemplate(GeneratorContext generatorContext, Project project, String name)
      Description copied from class: AbstractFunctionFeature
      Applies the test templates to the module. Subclasses may override to customize the test generation logic.
      Overrides:
      applyTestTemplate in class AbstractFunctionFeature
      Parameters:
      generatorContext - the generator context
      project - the project
      name - the name of the test class
    • applyFunction

      protected void applyFunction(GeneratorContext generatorContext, ApplicationType type)
      Description copied from class: AbstractFunctionFeature
      Applies the function setup based on the application type. Subclasses may override to customize how function templates and dependencies are applied.
      Overrides:
      applyFunction in class AbstractFunctionFeature
      Parameters:
      generatorContext - the generator context
      type - the application type
    • readmeTemplate

      protected Optional<com.fizzed.rocker.RockerModel> readmeTemplate(GeneratorContext generatorContext, Project project, BuildTool buildTool)
      Description copied from class: AbstractFunctionFeature
      Returns the README template for this function feature, if any. Subclasses may override to provide custom documentation.
      Overrides:
      readmeTemplate in class AbstractFunctionFeature
      Parameters:
      generatorContext - the generator context
      project - the project
      buildTool - the build tool used
      Returns:
      an optional Rocker model for the README
    • getFrameworkDocumentation

      public String getFrameworkDocumentation(GeneratorContext generatorContext)
      Parameters:
      generatorContext - Generator Context
      Returns:
      Returns a link to Framework documentation about the feature. eg. https://micronaut-projects.github.io/micronaut-cache/latest/guide/index.html#hazelcast
    • getThirdPartyDocumentation

      public String getThirdPartyDocumentation(GeneratorContext generatorContext)
      Parameters:
      generatorContext - Generator Context
      Returns:
      Returns a link to third party. E.g. https://hazelcast.org
    • addDependencies

      protected void addDependencies(ModuleContext module, Options options)
      Description copied from class: AbstractAzureFunction
      Adds the necessary dependencies for Azure Functions. Subclasses may override to customize dependency handling.
      Overrides:
      addDependencies in class AbstractAzureFunction
      Parameters:
      module - The module context to which dependencies will be added
      options - The selected options including build tool