This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PluginLoadContext : AssemblyLoadContext | |
{ | |
private AssemblyDependencyResolver _resolver; | |
public PluginLoadContext(string pluginPath) | |
{ | |
_resolver = new AssemblyDependencyResolver(pluginPath); | |
} | |
protected override Assembly? Load(AssemblyName assemblyName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Kafka: | |
# ------------------------------------------------------------------------------ | |
## The StatefulSet installs 3 pods by default | |
replicas: 3 | |
## The kafka image repository | |
image: "confluentinc/cp-kafka" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[FunctionName(“HttpTrigger”)] | |
public async static Task<IActionResult> RunAsync([HttpTrigger(AuthorizationLevel.Function, “get”, “post”, Route = null)]HttpRequest req, TraceWriter log) | |
{ | |
log.Info(“C# HTTP trigger function processed a request.”); | |
string name = req.Query[“name”]; | |
string requestBody = new StreamReader(req.Body).ReadToEnd(); | |
dynamic data = JsonConvert.DeserializeObject(requestBody); | |
name = name ?? data?.name; | |
return name != null | |
? (ActionResult)new OkObjectResult($”Hello, {name}”) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go | |
# Build your Go application. | |
# Add steps that test, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/vsts/pipelines/languages/go | |
pool: | |
vmImage: 'Ubuntu 16.04' | |
variables: | |
GOBIN: '$(GOPATH)/bin' # Go binaries path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cosmos DB | |
resource "azurerm_cosmosdb_account" "test" { | |
name = "${var.cosmosdb_account_name}" | |
location = "${azurerm_resource_group.test.location}" | |
resource_group_name = "${azurerm_resource_group.test.name}" | |
offer_type = "${var.cosmosdb_offer_type}" | |
consistency_policy { | |
consistency_level = "${var.cosmosdb_consistency_level}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Avro; | |
using Microsoft.Azure.WebJobs; | |
using Microsoft.Azure.WebJobs.Extensions.Kafka; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Google.Cloud.Storage.V1": "1.0.0-beta05" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Acceptance test", | |
"type": "go", | |
"request": "launch", | |
"mode": "test", | |
"program": "${workspaceRoot}/azuredevops/resource_project_test.go", | |
"args": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | |
// https://github.com/microsoft/vscode-dev-containers/tree/v0.106.0/containers/azure-functions-node-10 | |
{ | |
"name": "Azure Functions & Python 3 & Confluent Kafka", | |
"dockerComposeFile": "docker-compose.yml", | |
"service": "myfunction", | |
"workspaceFolder": "/workspace", | |
"remoteEnv": {"LD_LIBRARY_PATH": "/workspace/bin/runtimes/linux-x64/native"}, | |
"containerEnv": {"LD_LIBRARY_PATH": "/workspace/bin/runtimes/linux-x64/native"}, | |
"forwardPorts": [ 7071, 9021 ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Attach to Python Functions", | |
"type": "python", | |
"request": "attach", | |
"linux": { | |
"env": [{ "name": "LD_LIBRARY_PATH"}, {"value": "/workspace/bin/runtimes/linux-x64/native"}], | |
}, |
NewerOlder