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 System.Diagnostics.Tracing; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
HandleRequest(Guid.NewGuid()); | |
} | |
static void HandleRequest(Guid activityId) |
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
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
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"}], | |
}, |
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
import java.lang.reflect.Method; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
public class Main { | |
public static void main(String args[]){ | |
try{ | |
String pathToJar = args[0]; | |
System.out.println(pathToJar); | |
URL[] urls = { new URL("jar:file:" + pathToJar+"!/")}; |
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
package com.simplearchitect.lib; | |
public class LibrarySample { | |
public void execute() { | |
System.out.println("Hello World from Library."); | |
} | |
} |
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
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# Please consider adding local content in /etc/sudoers.d/ instead of | |
# directly modifying this file. | |
# | |
# See the man page for details on how to write a sudoers file. | |
# | |
Defaults env_reset | |
Defaults mail_badpass | |
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" |
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
{ | |
"extensions": { | |
"durableTask": { | |
"tracing": { | |
"DistributedTracingProtocol": "W3CTraceContext" | |
} | |
} | |
}, | |
"logging": { | |
"applicationInsights": { |
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
{ | |
"IsEncrypted": false, | |
"Values": { | |
"AzureWebJobsStorage": "UseDevelopmentStorage=true", | |
"FUNCTIONS_WORKER_RUNTIME": "dotnet", | |
"APPINSIGHTS_INSTRUMENTATIONKEY": "<YOUR_APPINSGITHS_INSTRUMENTATIONKEY_HERE>" | |
} | |
} |
NewerOlder