├── Rust
├── .gitignore
├── local.settings-example.json
├── Cargo.toml
├── host.json
├── SimpleHttpTrigger
│ └── function.json
├── README.md
├── src
│ └── main.rs
└── Cargo.lock
├── go
├── GoCustomHandlers
├── local.settings-example.json
├── host.json
├── SimpleHttpTrigger
│ └── function.json
├── HttpTriggerWithStreaming
│ └── function.json
├── QueueTrigger
│ └── function.json
├── BlobTrigger
│ └── function.json
├── QueueTriggerWithOutputs
│ └── function.json
├── readme.md
└── GoCustomHandlers.go
├── R
├── local.settings-example.json
├── hello
│ └── function.json
├── host.json
├── readme.md
└── rserver.R
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── SECURITY.md
└── .gitignore
/Rust/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | **/*.rs.bk
3 |
--------------------------------------------------------------------------------
/go/GoCustomHandlers:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure-Samples/functions-custom-handlers/HEAD/go/GoCustomHandlers
--------------------------------------------------------------------------------
/R/local.settings-example.json:
--------------------------------------------------------------------------------
1 | {
2 | "IsEncrypted": false,
3 | "Values": {
4 | "AzureWebJobsStorage": "YOUR_STORAGE_CONNECTION_STRING"
5 | }
6 | }
--------------------------------------------------------------------------------
/Rust/local.settings-example.json:
--------------------------------------------------------------------------------
1 | {
2 | "IsEncrypted": false,
3 | "Values": {
4 | "AzureWebJobsStorage": "YOUR_STORAGE_CONNECTION_STRING"
5 | }
6 | }
--------------------------------------------------------------------------------
/Rust/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "hello-world-server"
3 | version = "0.1.0"
4 | authors = ["paulbatum"]
5 | edition = "2018"
6 |
7 | [dependencies]
8 | hyper = "0.13.3"
9 | tokio = { version = "0.2.13", features = ["macros"] }
--------------------------------------------------------------------------------
/go/local.settings-example.json:
--------------------------------------------------------------------------------
1 | {
2 | "IsEncrypted": false,
3 | "Values": {
4 | "FUNCTIONS_WORKER_RUNTIME": "custom",
5 | "AzureWebJobsStorage": "UseDevelopmentStorage=true",
6 | "FUNCTIONS_CUSTOMHANDLER_PORT": "8080"
7 | },
8 | "ConnectionStrings": {}
9 | }
--------------------------------------------------------------------------------
/go/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "extensionBundle": {
4 | "id": "Microsoft.Azure.Functions.ExtensionBundle",
5 | "version": "[4.0.0, 5.0.0)"
6 | },
7 | "customHandler": {
8 | "description": {
9 | "defaultExecutablePath": "GoCustomHandlers"
10 | },
11 | "enableProxyingHttpRequest":true
12 | }
13 | }
--------------------------------------------------------------------------------
/R/hello/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings": [
3 | {
4 | "type": "httpTrigger",
5 | "direction": "in",
6 | "name": "req",
7 | "methods": [
8 | "get",
9 | "post"
10 | ]
11 | },
12 | {
13 | "type": "http",
14 | "direction": "out",
15 | "name": "res"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Rust/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "extensionBundle": {
4 | "id": "Microsoft.Azure.Functions.ExtensionBundle",
5 | "version": "[1.*, 2.0.0)"
6 | },
7 | "customHandler": {
8 | "description": {
9 | "defaultExecutablePath": "target/debug/hello-world-server.exe"
10 | },
11 | "enableForwardingHttpRequest":true
12 | }
13 | }
--------------------------------------------------------------------------------
/R/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "extensionBundle": {
4 | "id": "Microsoft.Azure.Functions.ExtensionBundle",
5 | "version": "[1.*, 2.0.0)"
6 | },
7 | "customHandler": {
8 | "description": {
9 | "defaultExecutablePath": "RScript",
10 | "arguments": ["rserver.R"]
11 | },
12 | "enableForwardingHttpRequest":true
13 | }
14 | }
--------------------------------------------------------------------------------
/go/SimpleHttpTrigger/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings": [
3 | {
4 | "type": "httpTrigger",
5 | "direction": "in",
6 | "name": "req",
7 | "methods": [
8 | "get",
9 | "post"
10 | ]
11 | },
12 | {
13 | "type": "http",
14 | "direction": "out",
15 | "name": "res"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/Rust/SimpleHttpTrigger/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings": [
3 | {
4 | "type": "httpTrigger",
5 | "direction": "in",
6 | "name": "req",
7 | "methods": [
8 | "get",
9 | "post"
10 | ]
11 | },
12 | {
13 | "type": "http",
14 | "direction": "out",
15 | "name": "res"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/go/HttpTriggerWithStreaming/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings": [
3 | {
4 | "type": "httpTrigger",
5 | "direction": "in",
6 | "name": "req",
7 | "methods": [
8 | "get",
9 | "post"
10 | ]
11 | },
12 | {
13 | "type": "http",
14 | "direction": "out",
15 | "name": "res"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/go/QueueTrigger/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings": [
3 | {
4 | "name": "myQueueItem",
5 | "type": "queueTrigger",
6 | "direction": "in",
7 | "queueName": "test-input",
8 | "connection": "AzureWebJobsStorage"
9 | },
10 | {
11 | "name": "$return",
12 | "type": "queue",
13 | "direction": "out",
14 | "queueName": "test-output",
15 | "connection": "AzureWebJobsStorage"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Microsoft Open Source Code of Conduct
2 |
3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4 |
5 | Resources:
6 |
7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
10 |
--------------------------------------------------------------------------------
/go/BlobTrigger/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings" : [ {
3 | "type" : "blobTrigger",
4 | "direction" : "in",
5 | "name" : "triggerBlob",
6 | "path" : "test-triggerinput-httpworker/{name}",
7 | "dataType" : "binary",
8 | "connection" : "AzureWebJobsStorage"
9 | },
10 | {
11 | "type" : "blob",
12 | "direction" : "out",
13 | "name" : "$return",
14 | "path" : "test-output-httpworker/{name}",
15 | "dataType" : "binary",
16 | "connection" : "AzureWebJobsStorage"
17 | } ]
18 | }
--------------------------------------------------------------------------------
/go/QueueTriggerWithOutputs/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "bindings": [
3 | {
4 | "name": "myQueueItem",
5 | "type": "queueTrigger",
6 | "direction": "in",
7 | "queueName": "test-inputmultiout",
8 | "connection": "AzureWebJobsStorage"
9 | },
10 | {
11 | "name": "$return",
12 | "type": "queue",
13 | "direction": "out",
14 | "queueName": "test-output",
15 | "connection": "AzureWebJobsStorage"
16 | },
17 | {
18 | "name": "output1",
19 | "type": "queue",
20 | "direction": "out",
21 | "queueName": "test-output1",
22 | "connection": "AzureWebJobsStorage"
23 | }
24 | ]
25 | }
--------------------------------------------------------------------------------
/R/readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Azure Functions custom handler in R
3 |
4 | The samples available in this folder demonstrate how to implement a [custom handler](https://docs.microsoft.com/azure/azure-functions/functions-custom-handlers) in R.
5 |
6 | Example functions featured in this repo include:
7 |
8 | | Name | Trigger | Input | Output |
9 | |------|---------|-------|--------|
10 | | [hello](../../../tree/master/R/hello) | HTTP | n/a | na/ |
11 |
12 | ## Configuration
13 |
14 | The *local.settings-example.json* is provided to show what values the app is expecting to read from environment variables. Make a copy of *local.settings-example.json* and rename it *local.settings.json* and replace any values that begin with "**YOUR_**" with your values.
15 |
--------------------------------------------------------------------------------
/Rust/README.md:
--------------------------------------------------------------------------------
1 | # Azure Functions custom handler in Rust
2 |
3 | The samples available in this folder demonstrate how to implement a [custom handler](https://docs.microsoft.com/azure/azure-functions/functions-custom-handlers) in Rust.
4 |
5 | Example functions featured in this repo include:
6 |
7 | | Name | Trigger | Input | Output |
8 | |------|---------|-------|--------|
9 | | [SimpleHttpTrigger](../../../tree/master/Rust/SimpleHttpTrigger) | HTTP | n/a | n/a |
10 |
11 | ## Configuration
12 |
13 | The *local.settings-example.json* is provided to show what values the app is expecting to read from environment variables. Make a copy of *local.settings-example.json* and rename it *local.settings.json* and replace any values that begin with "**YOUR_**" with your values.
14 |
15 | ## Pre-reqs
16 |
17 | - Rust : https://www.rust-lang.org/learn/get-started
18 | - Azure Functions Core Tools
19 |
20 | ## Build + Run
21 |
22 | - run `cargo build`
23 | - run `func host start`
24 |
25 | **NOTE**: if running on a non-Windows platform you will have to remove ".exe" from the `defaultExecutablePath` in the `host.json`.
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/Rust/src/main.rs:
--------------------------------------------------------------------------------
1 | use hyper::service::{make_service_fn, service_fn};
2 | use hyper::{Body, Error, Request, Response, Server};
3 | use hyper::{Method, StatusCode};
4 | use std::convert::Infallible;
5 | use std::env;
6 |
7 | async fn handler(req: Request
) -> Result, Infallible> {
8 | let builder = Response::builder();
9 |
10 | let response = match (req.method(), req.uri().path()) {
11 | (&Method::GET, "/api/SimpleHttpTrigger") => builder
12 | .body(Body::from("Hello World from rust Custom Handler"))
13 | .unwrap(),
14 | (&Method::POST, "/echo") => builder.body(req.into_body()).unwrap(),
15 | _ => builder
16 | .status(StatusCode::NOT_FOUND)
17 | .body(Body::from(""))
18 | .unwrap(),
19 | };
20 |
21 | Ok(response)
22 | }
23 |
24 | #[tokio::main]
25 | async fn main() -> Result<(), Error> {
26 | let port_key = "FUNCTIONS_CUSTOMHANDLER_PORT";
27 | let port: u16 = match env::var(port_key) {
28 | Ok(val) => val.parse().expect("Custom Handler port is not a number!"),
29 | Err(_) => 3000,
30 | };
31 | let addr = ([127, 0, 0, 1], port).into();
32 |
33 | let server = Server::bind(&addr).serve(make_service_fn(|_| async move {
34 | Ok::<_, Infallible>(service_fn(handler))
35 | }));
36 |
37 | println!("Listening on http://{}", addr);
38 |
39 | server.await
40 | }
41 |
--------------------------------------------------------------------------------
/go/readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Azure Functions custom handler in Go
3 |
4 | The samples available in this folder demonstrate how to implement a [custom handler](https://docs.microsoft.com/azure/azure-functions/functions-custom-handlers) in Go.
5 |
6 | Example functions featured in this repo include:
7 |
8 | | Name | Trigger | Input | Output |
9 | |------|---------|-------|--------|
10 | | [BlobTrigger](../../../tree/master/go/BlobTrigger) | Blob Storage | Blob Storage | Blob Storage|
11 | | [HttpTriggerWithStreaming](../../../tree/master/go/HttpTriggerWithStreaming) | HTTP | n/a | n/a |
12 | | [QueueTrigger](../../../tree/master/go/QueueTrigger) | Queue Storage | Queue Storage | Queue Storage |
13 | | [QueueTriggerWithOutputs](../../../tree/master/go/QueueTriggerWithOutputs) | Queue Storage | Queue Storage | Queue Storage |
14 | | [SimpleHttpTrigger](../../../tree/master/go/SimpleHttpTrigger) | HTTP | n/a | n/a |
15 |
16 | ## Configuration
17 |
18 | The *local.settings-example.json* is provided to show what values the app is expecting to read from environment variables. Make a copy of *local.settings-example.json* and rename it *local.settings.json* and replace any values that begin with "**YOUR_**" with your values.
19 |
20 | ## Building the go Executable
21 |
22 | Run the following in the root of the sample (where your `GoCustomHandlers.go` file is located).
23 |
24 | ```
25 | go build -o GoCustomHandlers.exe GoCustomHandlers.go
26 | ```
27 |
28 | If you need a Linux executable (and are working in a Windows environment) you can use the following:
29 |
30 | ```
31 | $env:GOOS = "linux"
32 | $env:GOARCH = "amd64"
33 | cd GoCustomHandlers
34 | go build -o GoCustomHandlers GoCustomHandlers.go
35 | ```
36 |
--------------------------------------------------------------------------------
/R/rserver.R:
--------------------------------------------------------------------------------
1 | library(httpuv)
2 |
3 | PORTEnv <- Sys.getenv("FUNCTIONS_CUSTOMHANDLER_PORT")
4 | PORT = strtoi(PORTEnv , base = 0L)
5 |
6 | http_not_found <- list(
7 | status=404,
8 | body='404 Not Found'
9 | )
10 | http_method_not_allowed <- list(
11 | status=405,
12 | body='405 Method Not Allowed'
13 | )
14 |
15 | hello_handler <- list(
16 | GET = function (request) list(body="Hello world")
17 | # POST = function (request) { ... }
18 | )
19 |
20 | routes <- list(
21 | '/api/hello' = hello_handler,
22 | # Required by App Engine.
23 | '/_ah/health' = list(
24 | GET = function (request) list()
25 | )
26 | )
27 |
28 | router <- function (routes, request) {
29 | # Pick the right handler for this path and method.
30 | # Respond with 404s and 405s if the handler isn't found.
31 | if (!request$PATH_INFO %in% names(routes)) {
32 | return(http_not_found)
33 | }
34 | path_handler <- routes[[request$PATH_INFO]]
35 |
36 | if (!request$REQUEST_METHOD %in% names(path_handler)) {
37 | return(http_method_not_allowed)
38 | }
39 | method_handler <- path_handler[[request$REQUEST_METHOD]]
40 |
41 | return(method_handler(request))
42 | }
43 |
44 | app <- list(
45 | call = function (request) {
46 | response <- router(routes, request)
47 |
48 | # Provide some defaults for the response
49 | # to make handler code simpler.
50 | if (!'status' %in% names(response)) {
51 | response$status <- 200
52 | }
53 | if (!'headers' %in% names(response)) {
54 | response$headers <- list()
55 | }
56 | if (!'Content-Type' %in% names(response$headers)) {
57 | response$headers[['Content-Type']] <- 'text/plain'
58 | }
59 |
60 | return(response)
61 | }
62 | )
63 |
64 | cat(paste0("Server listening on :", PORT, "...\n"))
65 | runServer("0.0.0.0", PORT, app)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Azure Functions custom handlers (preview)
2 |
3 | Every Functions app is executed by a language-specific handler. While Azure Functions supports many [language handlers](https://docs.microsoft.com/azure/azure-functions/supported-languages) by default, there are cases where you may want additional control over the app execution environment. Custom handlers give you this additional control.
4 |
5 | Custom handlers are lightweight web servers that receive events from the Functions host. Any language that supports HTTP primitives can implement a custom handler.
6 |
7 | Custom handlers are best suited for situations where you want to:
8 |
9 | - Implement a Functions app in a language beyond the officially supported languages
10 | - Implement a Functions app in a language version or runtime not supported by default
11 | - Have granular control over the app execution environment
12 |
13 | With custom handlers, all [triggers and input and output bindings](https://docs.microsoft.com/azure/azure-functions/functions-triggers-bindings) are supported via [extension bundles](https://docs.microsoft.com/azure/azure-functions/functions-bindings-register).
14 |
15 | Read more [about custom handlers in detail](https://docs.microsoft.com/azure/azure-functions/functions-custom-handlers).
16 |
17 | ## Samples
18 |
19 | The following samples demonstrate how to implement a custom handler in the following languages:
20 |
21 | - [C#](https://github.com/Azure-Samples/functions-custom-handlers/tree/master/CSharp)
22 | - [Go](https://github.com/Azure-Samples/functions-custom-handlers/tree/master/go)
23 | - [Java](https://github.com/Azure-Samples/functions-custom-handlers/tree/master/Java)
24 | - [JavaScript](https://github.com/Azure-Samples/functions-custom-handlers/tree/master/node)
25 | - [R](https://github.com/Azure-Samples/functions-custom-handlers/tree/master/R)
26 | - [Rust](https://github.com/Azure-Samples/functions-custom-handlers/tree/master/Rust)
27 |
28 | ## Docker
29 |
30 | Following is an example dockerfile using azure functions node base image
31 |
32 | ```
33 | # To enable ssh & remote debugging on app service change the base image to the one below
34 | # FROM mcr.microsoft.com/azure-functions/node:2.0-appservice
35 | FROM mcr.microsoft.com/azure-functions/node:2.0
36 |
37 | ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
38 | AzureFunctionsJobHost__Logging__Console__IsEnabled=true
39 |
40 | COPY . /home/site/wwwroot
41 |
42 | RUN cd /home/site/wwwroot
43 |
44 | ```
45 |
46 | Copy any of the samples to the directory where you have dockerfile and build an image
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/go/GoCustomHandlers.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "log"
7 | "net/http"
8 | "os"
9 | "time"
10 | )
11 |
12 | type InvokeRequest struct {
13 | Data map[string]json.RawMessage
14 | Metadata map[string]interface{}
15 | }
16 |
17 | type InvokeResponse struct {
18 | Outputs map[string]interface{}
19 | Logs []string
20 | ReturnValue interface{}
21 | }
22 |
23 | func queueTriggerHandler(w http.ResponseWriter, r *http.Request) {
24 | var invokeReq InvokeRequest
25 | d := json.NewDecoder(r.Body)
26 | decodeErr := d.Decode(&invokeReq)
27 | if decodeErr != nil {
28 | http.Error(w, decodeErr.Error(), http.StatusBadRequest)
29 | return
30 | }
31 | fmt.Println("The JSON data is:invokeReq metadata......")
32 | fmt.Println(invokeReq.Metadata)
33 | fmt.Println("The JSON data is:invokeReq data......")
34 | fmt.Println(invokeReq.Data)
35 |
36 | returnValue := "HelloWorld"
37 | invokeResponse := InvokeResponse{Logs: []string{"test log1", "test log2"}, ReturnValue: returnValue}
38 |
39 | js, err := json.Marshal(invokeResponse)
40 | if err != nil {
41 | http.Error(w, err.Error(), http.StatusInternalServerError)
42 | return
43 | }
44 |
45 | w.Header().Set("Content-Type", "application/json")
46 | w.Write(js)
47 | }
48 |
49 | func blobTriggerHandler(w http.ResponseWriter, r *http.Request) {
50 | var invokeReq InvokeRequest
51 | d := json.NewDecoder(r.Body)
52 | decodeErr := d.Decode(&invokeReq)
53 | if decodeErr != nil {
54 | // bad JSON or unrecognized json field
55 | http.Error(w, decodeErr.Error(), http.StatusBadRequest)
56 | return
57 | }
58 | fmt.Println("The JSON data is:invokeReq metadata......")
59 | fmt.Println(invokeReq.Metadata)
60 |
61 | returnValue := invokeReq.Data["triggerBlob"]
62 | invokeResponse := InvokeResponse{Logs: []string{"test log1", "test log2"}, ReturnValue: returnValue}
63 |
64 | js, err := json.Marshal(invokeResponse)
65 | if err != nil {
66 | http.Error(w, err.Error(), http.StatusInternalServerError)
67 | return
68 | }
69 |
70 | w.Header().Set("Content-Type", "application/json")
71 | w.Write(js)
72 | }
73 |
74 | func queueTriggerWithOutputsHandler(w http.ResponseWriter, r *http.Request) {
75 | var invokeReq InvokeRequest
76 | d := json.NewDecoder(r.Body)
77 | decodeErr := d.Decode(&invokeReq)
78 | if decodeErr != nil {
79 | // bad JSON or unrecognized json field
80 | http.Error(w, decodeErr.Error(), http.StatusBadRequest)
81 | return
82 | }
83 | fmt.Println("The JSON data is:invokeReq metadata......")
84 | fmt.Println(invokeReq.Metadata)
85 | fmt.Println("The JSON data is:invokeReq data......")
86 | fmt.Println(invokeReq.Data)
87 |
88 | returnValue := 100
89 | outputs := make(map[string]interface{})
90 | outputs["output1"] = "output from go"
91 |
92 | invokeResponse := InvokeResponse{outputs, []string{"test log1", "test log2"}, returnValue}
93 |
94 | js, err := json.Marshal(invokeResponse)
95 | if err != nil {
96 | http.Error(w, err.Error(), http.StatusInternalServerError)
97 | return
98 | }
99 |
100 | w.Header().Set("Content-Type", "application/json")
101 | w.Write(js)
102 | }
103 |
104 | func simpleHttpTriggerHandler(w http.ResponseWriter, r *http.Request) {
105 | t := time.Now()
106 | fmt.Println(t.Month())
107 | fmt.Println(t.Day())
108 | fmt.Println(t.Year())
109 | ua := r.Header.Get("User-Agent")
110 | fmt.Printf("user agent is: %s \n", ua)
111 | invocationid := r.Header.Get("X-Azure-Functions-InvocationId")
112 | fmt.Printf("invocationid is: %s \n", invocationid)
113 |
114 | queryParams := r.URL.Query()
115 |
116 | for k, v := range queryParams {
117 | fmt.Println("k:", k, "v:", v)
118 | }
119 |
120 | w.Write([]byte("Hello World from go worker"))
121 | }
122 |
123 | func httpTriggerWithStreaming(w http.ResponseWriter, r *http.Request) {
124 | name := r.URL.Query().Get("name")
125 | if name == "" {
126 | name = "world"
127 | }
128 |
129 | // Ensure we can flush.
130 | flusher, ok := w.(http.Flusher)
131 | if !ok {
132 | http.Error(w, "streaming unsupported", http.StatusInternalServerError)
133 | return
134 | }
135 |
136 | w.Header().Set("Content-Type", "text/event-stream")
137 | w.Header().Set("Cache-Control", "no-store")
138 | w.Header().Set("X-Content-Type-Options", "nosniff")
139 | w.WriteHeader(http.StatusOK)
140 |
141 | // Start a JSON array.
142 | fmt.Fprint(w, "[{\"chunk\":1,\"message\":\"Hello ")
143 | flusher.Flush()
144 |
145 | // Simulate work and stream more.
146 | time.Sleep(2000 * time.Millisecond)
147 | fmt.Fprintf(w, "{\"chunk\":2,\"message\":\"%s\"}", name)
148 | flusher.Flush()
149 |
150 | time.Sleep(1000 * time.Millisecond)
151 | fmt.Fprint(w, ", {\"chunk\":3,\"status\":\"complete\"}]")
152 | flusher.Flush()
153 |
154 | return
155 | }
156 |
157 | func main() {
158 | customHandlerPort, exists := os.LookupEnv("FUNCTIONS_CUSTOMHANDLER_PORT")
159 | if exists {
160 | fmt.Println("FUNCTIONS_CUSTOMHANDLER_PORT: " + customHandlerPort)
161 | }
162 | mux := http.NewServeMux()
163 | mux.HandleFunc("/QueueTrigger", queueTriggerHandler)
164 | mux.HandleFunc("/BlobTrigger", blobTriggerHandler)
165 | mux.HandleFunc("/QueueTriggerWithOutputs", queueTriggerWithOutputsHandler)
166 | mux.HandleFunc("/api/SimpleHttpTrigger", simpleHttpTriggerHandler)
167 | mux.HandleFunc("/api/HttpTriggerWithStreaming", httpTriggerWithStreaming)
168 | fmt.Println("Go server Listening...on FUNCTIONS_CUSTOMHANDLER_PORT:", customHandlerPort)
169 | log.Fatal(http.ListenAndServe(":"+customHandlerPort, mux))
170 | }
171 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # Ignore VS Code settings and workspace files
14 | .vscode/
15 | *.code-workspace
16 |
17 | # User-specific files (MonoDevelop/Xamarin Studio)
18 | *.userprefs
19 |
20 | # Mono auto generated files
21 | mono_crash.*
22 |
23 | # Build results
24 | [Dd]ebug/
25 | [Dd]ebugPublic/
26 | [Rr]elease/
27 | [Rr]eleases/
28 | x64/
29 | x86/
30 | [Aa][Rr][Mm]/
31 | [Aa][Rr][Mm]64/
32 | bld/
33 | [Bb]in/
34 | [Oo]bj/
35 | [Ll]og/
36 | [Ll]ogs/
37 |
38 | # Visual Studio 2015/2017 cache/options directory
39 | .vs/
40 | # Uncomment if you have tasks that create the project's static files in wwwroot
41 | #wwwroot/
42 |
43 | # Visual Studio 2017 auto generated files
44 | Generated\ Files/
45 |
46 | # MSTest test Results
47 | [Tt]est[Rr]esult*/
48 | [Bb]uild[Ll]og.*
49 |
50 | # NUnit
51 | *.VisualState.xml
52 | TestResult.xml
53 | nunit-*.xml
54 |
55 | # Build Results of an ATL Project
56 | [Dd]ebugPS/
57 | [Rr]eleasePS/
58 | dlldata.c
59 |
60 | # Benchmark Results
61 | BenchmarkDotNet.Artifacts/
62 |
63 | # .NET Core
64 | project.lock.json
65 | project.fragment.lock.json
66 | artifacts/
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.vspscc
94 | *.vssscc
95 | .builds
96 | *.pidb
97 | *.svclog
98 | *.scc
99 |
100 | # Chutzpah Test files
101 | _Chutzpah*
102 |
103 | # Visual C++ cache files
104 | ipch/
105 | *.aps
106 | *.ncb
107 | *.opendb
108 | *.opensdf
109 | *.sdf
110 | *.cachefile
111 | *.VC.db
112 | *.VC.VC.opendb
113 |
114 | # Visual Studio profiler
115 | *.psess
116 | *.vsp
117 | *.vspx
118 | *.sap
119 |
120 | # Visual Studio Trace Files
121 | *.e2e
122 |
123 | # TFS 2012 Local Workspace
124 | $tf/
125 |
126 | # Guidance Automation Toolkit
127 | *.gpState
128 |
129 | # ReSharper is a .NET coding add-in
130 | _ReSharper*/
131 | *.[Rr]e[Ss]harper
132 | *.DotSettings.user
133 |
134 | # TeamCity is a build add-in
135 | _TeamCity*
136 |
137 | # DotCover is a Code Coverage Tool
138 | *.dotCover
139 |
140 | # AxoCover is a Code Coverage Tool
141 | .axoCover/*
142 | !.axoCover/settings.json
143 |
144 | # Visual Studio code coverage results
145 | *.coverage
146 | *.coveragexml
147 |
148 | # NCrunch
149 | _NCrunch_*
150 | .*crunch*.local.xml
151 | nCrunchTemp_*
152 |
153 | # MightyMoose
154 | *.mm.*
155 | AutoTest.Net/
156 |
157 | # Web workbench (sass)
158 | .sass-cache/
159 |
160 | # Installshield output folder
161 | [Ee]xpress/
162 |
163 | # DocProject is a documentation generator add-in
164 | DocProject/buildhelp/
165 | DocProject/Help/*.HxT
166 | DocProject/Help/*.HxC
167 | DocProject/Help/*.hhc
168 | DocProject/Help/*.hhk
169 | DocProject/Help/*.hhp
170 | DocProject/Help/Html2
171 | DocProject/Help/html
172 |
173 | # Click-Once directory
174 | publish/
175 |
176 | # Publish Web Output
177 | *.[Pp]ublish.xml
178 | *.azurePubxml
179 | # Note: Comment the next line if you want to checkin your web deploy settings,
180 | # but database connection strings (with potential passwords) will be unencrypted
181 | *.pubxml
182 | *.publishproj
183 |
184 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
185 | # checkin your Azure Web App publish settings, but sensitive information contained
186 | # in these scripts will be unencrypted
187 | PublishScripts/
188 |
189 | # NuGet Packages
190 | *.nupkg
191 | # NuGet Symbol Packages
192 | *.snupkg
193 | # The packages folder can be ignored because of Package Restore
194 | **/[Pp]ackages/*
195 | # except build/, which is used as an MSBuild target.
196 | !**/[Pp]ackages/build/
197 | # Uncomment if necessary however generally it will be regenerated when needed
198 | #!**/[Pp]ackages/repositories.config
199 | # NuGet v3's project.json files produces more ignorable files
200 | *.nuget.props
201 | *.nuget.targets
202 |
203 | # Microsoft Azure Build Output
204 | csx/
205 | *.build.csdef
206 |
207 | # Microsoft Azure Emulator
208 | ecf/
209 | rcf/
210 |
211 | # Windows Store app package directories and files
212 | AppPackages/
213 | BundleArtifacts/
214 | Package.StoreAssociation.xml
215 | _pkginfo.txt
216 | *.appx
217 | *.appxbundle
218 | *.appxupload
219 |
220 | # Visual Studio cache files
221 | # files ending in .cache can be ignored
222 | *.[Cc]ache
223 | # but keep track of directories ending in .cache
224 | !?*.[Cc]ache/
225 |
226 | # Others
227 | ClientBin/
228 | ~$*
229 | *~
230 | *.dbmdl
231 | *.dbproj.schemaview
232 | *.jfm
233 | *.pfx
234 | *.publishsettings
235 | orleans.codegen.cs
236 |
237 | # Including strong name files can present a security risk
238 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
239 | #*.snk
240 |
241 | # Since there are multiple workflows, uncomment next line to ignore bower_components
242 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
243 | #bower_components/
244 |
245 | # RIA/Silverlight projects
246 | Generated_Code/
247 |
248 | # Backup & report files from converting an old project file
249 | # to a newer Visual Studio version. Backup files are not needed,
250 | # because we have git ;-)
251 | _UpgradeReport_Files/
252 | Backup*/
253 | UpgradeLog*.XML
254 | UpgradeLog*.htm
255 | ServiceFabricBackup/
256 | *.rptproj.bak
257 |
258 | # SQL Server files
259 | *.mdf
260 | *.ldf
261 | *.ndf
262 |
263 | # Business Intelligence projects
264 | *.rdl.data
265 | *.bim.layout
266 | *.bim_*.settings
267 | *.rptproj.rsuser
268 | *- [Bb]ackup.rdl
269 | *- [Bb]ackup ([0-9]).rdl
270 | *- [Bb]ackup ([0-9][0-9]).rdl
271 |
272 | # Microsoft Fakes
273 | FakesAssemblies/
274 |
275 | # GhostDoc plugin setting file
276 | *.GhostDoc.xml
277 |
278 | # Node.js Tools for Visual Studio
279 | .ntvs_analysis.dat
280 | node_modules/
281 |
282 | # Visual Studio 6 build log
283 | *.plg
284 |
285 | # Visual Studio 6 workspace options file
286 | *.opt
287 |
288 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
289 | *.vbw
290 |
291 | # Visual Studio LightSwitch build output
292 | **/*.HTMLClient/GeneratedArtifacts
293 | **/*.DesktopClient/GeneratedArtifacts
294 | **/*.DesktopClient/ModelManifest.xml
295 | **/*.Server/GeneratedArtifacts
296 | **/*.Server/ModelManifest.xml
297 | _Pvt_Extensions
298 |
299 | # Paket dependency manager
300 | .paket/paket.exe
301 | paket-files/
302 |
303 | # FAKE - F# Make
304 | .fake/
305 |
306 | # CodeRush personal settings
307 | .cr/personal
308 |
309 | # Python Tools for Visual Studio (PTVS)
310 | __pycache__/
311 | *.pyc
312 |
313 | # Cake - Uncomment if you are using it
314 | # tools/**
315 | # !tools/packages.config
316 |
317 | # Tabs Studio
318 | *.tss
319 |
320 | # Telerik's JustMock configuration file
321 | *.jmconfig
322 |
323 | # BizTalk build output
324 | *.btp.cs
325 | *.btm.cs
326 | *.odx.cs
327 | *.xsd.cs
328 |
329 | # OpenCover UI analysis results
330 | OpenCover/
331 |
332 | # Azure Stream Analytics local run output
333 | ASALocalRun/
334 |
335 | # MSBuild Binary and Structured Log
336 | *.binlog
337 |
338 | # NVidia Nsight GPU debugger configuration file
339 | *.nvuser
340 |
341 | # MFractors (Xamarin productivity tool) working folder
342 | .mfractor/
343 |
344 | # Local History for Visual Studio
345 | .localhistory/
346 |
347 | # BeatPulse healthcheck temp database
348 | healthchecksdb
349 |
350 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
351 | MigrationBackup/
352 |
353 | # Ionide (cross platform F# VS Code tools) working folder
354 | .ionide/
355 | /go/*.exe
356 | /Java/com.java/target/*
357 |
--------------------------------------------------------------------------------
/Rust/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | [[package]]
4 | name = "autocfg"
5 | version = "0.1.7"
6 | source = "registry+https://github.com/rust-lang/crates.io-index"
7 |
8 | [[package]]
9 | name = "bitflags"
10 | version = "1.2.1"
11 | source = "registry+https://github.com/rust-lang/crates.io-index"
12 |
13 | [[package]]
14 | name = "bytes"
15 | version = "0.5.4"
16 | source = "registry+https://github.com/rust-lang/crates.io-index"
17 |
18 | [[package]]
19 | name = "cfg-if"
20 | version = "0.1.10"
21 | source = "registry+https://github.com/rust-lang/crates.io-index"
22 |
23 | [[package]]
24 | name = "fnv"
25 | version = "1.0.6"
26 | source = "registry+https://github.com/rust-lang/crates.io-index"
27 |
28 | [[package]]
29 | name = "fuchsia-zircon"
30 | version = "0.3.3"
31 | source = "registry+https://github.com/rust-lang/crates.io-index"
32 | dependencies = [
33 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
34 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
35 | ]
36 |
37 | [[package]]
38 | name = "fuchsia-zircon-sys"
39 | version = "0.3.3"
40 | source = "registry+https://github.com/rust-lang/crates.io-index"
41 |
42 | [[package]]
43 | name = "futures-channel"
44 | version = "0.3.4"
45 | source = "registry+https://github.com/rust-lang/crates.io-index"
46 | dependencies = [
47 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
48 | ]
49 |
50 | [[package]]
51 | name = "futures-core"
52 | version = "0.3.4"
53 | source = "registry+https://github.com/rust-lang/crates.io-index"
54 |
55 | [[package]]
56 | name = "futures-sink"
57 | version = "0.3.4"
58 | source = "registry+https://github.com/rust-lang/crates.io-index"
59 |
60 | [[package]]
61 | name = "futures-task"
62 | version = "0.3.4"
63 | source = "registry+https://github.com/rust-lang/crates.io-index"
64 |
65 | [[package]]
66 | name = "futures-util"
67 | version = "0.3.4"
68 | source = "registry+https://github.com/rust-lang/crates.io-index"
69 | dependencies = [
70 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
71 | "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
72 | "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
73 | ]
74 |
75 | [[package]]
76 | name = "h2"
77 | version = "0.2.2"
78 | source = "registry+https://github.com/rust-lang/crates.io-index"
79 | dependencies = [
80 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
81 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
82 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
83 | "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
84 | "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
85 | "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
86 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
87 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
88 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
89 | "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
90 | "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
91 | ]
92 |
93 | [[package]]
94 | name = "hello-world-server"
95 | version = "0.1.0"
96 | dependencies = [
97 | "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)",
98 | "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
99 | ]
100 |
101 | [[package]]
102 | name = "http"
103 | version = "0.2.0"
104 | source = "registry+https://github.com/rust-lang/crates.io-index"
105 | dependencies = [
106 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
107 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
108 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
109 | ]
110 |
111 | [[package]]
112 | name = "http-body"
113 | version = "0.3.1"
114 | source = "registry+https://github.com/rust-lang/crates.io-index"
115 | dependencies = [
116 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
117 | "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
118 | ]
119 |
120 | [[package]]
121 | name = "httparse"
122 | version = "1.3.4"
123 | source = "registry+https://github.com/rust-lang/crates.io-index"
124 |
125 | [[package]]
126 | name = "hyper"
127 | version = "0.13.3"
128 | source = "registry+https://github.com/rust-lang/crates.io-index"
129 | dependencies = [
130 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
131 | "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
132 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
133 | "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
134 | "h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
135 | "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
136 | "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
137 | "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
138 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
139 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
140 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
141 | "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
142 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)",
143 | "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
144 | "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
145 | "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
146 | ]
147 |
148 | [[package]]
149 | name = "indexmap"
150 | version = "1.3.0"
151 | source = "registry+https://github.com/rust-lang/crates.io-index"
152 | dependencies = [
153 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
154 | ]
155 |
156 | [[package]]
157 | name = "iovec"
158 | version = "0.1.4"
159 | source = "registry+https://github.com/rust-lang/crates.io-index"
160 | dependencies = [
161 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
162 | ]
163 |
164 | [[package]]
165 | name = "itoa"
166 | version = "0.4.4"
167 | source = "registry+https://github.com/rust-lang/crates.io-index"
168 |
169 | [[package]]
170 | name = "kernel32-sys"
171 | version = "0.2.2"
172 | source = "registry+https://github.com/rust-lang/crates.io-index"
173 | dependencies = [
174 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
175 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
176 | ]
177 |
178 | [[package]]
179 | name = "lazy_static"
180 | version = "1.4.0"
181 | source = "registry+https://github.com/rust-lang/crates.io-index"
182 |
183 | [[package]]
184 | name = "libc"
185 | version = "0.2.65"
186 | source = "registry+https://github.com/rust-lang/crates.io-index"
187 |
188 | [[package]]
189 | name = "log"
190 | version = "0.4.8"
191 | source = "registry+https://github.com/rust-lang/crates.io-index"
192 | dependencies = [
193 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
194 | ]
195 |
196 | [[package]]
197 | name = "memchr"
198 | version = "2.3.3"
199 | source = "registry+https://github.com/rust-lang/crates.io-index"
200 |
201 | [[package]]
202 | name = "mio"
203 | version = "0.6.21"
204 | source = "registry+https://github.com/rust-lang/crates.io-index"
205 | dependencies = [
206 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
207 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
208 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
209 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
210 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
211 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
212 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
213 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
214 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
215 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
216 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
217 | ]
218 |
219 | [[package]]
220 | name = "miow"
221 | version = "0.2.1"
222 | source = "registry+https://github.com/rust-lang/crates.io-index"
223 | dependencies = [
224 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
225 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
226 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
227 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
228 | ]
229 |
230 | [[package]]
231 | name = "net2"
232 | version = "0.2.33"
233 | source = "registry+https://github.com/rust-lang/crates.io-index"
234 | dependencies = [
235 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
236 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
237 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
238 | ]
239 |
240 | [[package]]
241 | name = "pin-project"
242 | version = "0.4.8"
243 | source = "registry+https://github.com/rust-lang/crates.io-index"
244 | dependencies = [
245 | "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
246 | ]
247 |
248 | [[package]]
249 | name = "pin-project-internal"
250 | version = "0.4.8"
251 | source = "registry+https://github.com/rust-lang/crates.io-index"
252 | dependencies = [
253 | "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
254 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
255 | "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
256 | ]
257 |
258 | [[package]]
259 | name = "pin-project-lite"
260 | version = "0.1.4"
261 | source = "registry+https://github.com/rust-lang/crates.io-index"
262 |
263 | [[package]]
264 | name = "pin-utils"
265 | version = "0.1.0-alpha.4"
266 | source = "registry+https://github.com/rust-lang/crates.io-index"
267 |
268 | [[package]]
269 | name = "proc-macro2"
270 | version = "1.0.9"
271 | source = "registry+https://github.com/rust-lang/crates.io-index"
272 | dependencies = [
273 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
274 | ]
275 |
276 | [[package]]
277 | name = "quote"
278 | version = "1.0.3"
279 | source = "registry+https://github.com/rust-lang/crates.io-index"
280 | dependencies = [
281 | "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
282 | ]
283 |
284 | [[package]]
285 | name = "redox_syscall"
286 | version = "0.1.56"
287 | source = "registry+https://github.com/rust-lang/crates.io-index"
288 |
289 | [[package]]
290 | name = "slab"
291 | version = "0.4.2"
292 | source = "registry+https://github.com/rust-lang/crates.io-index"
293 |
294 | [[package]]
295 | name = "syn"
296 | version = "1.0.16"
297 | source = "registry+https://github.com/rust-lang/crates.io-index"
298 | dependencies = [
299 | "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
300 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
301 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
302 | ]
303 |
304 | [[package]]
305 | name = "time"
306 | version = "0.1.42"
307 | source = "registry+https://github.com/rust-lang/crates.io-index"
308 | dependencies = [
309 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
310 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
311 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
312 | ]
313 |
314 | [[package]]
315 | name = "tokio"
316 | version = "0.2.13"
317 | source = "registry+https://github.com/rust-lang/crates.io-index"
318 | dependencies = [
319 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
320 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
321 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
322 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
323 | "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
324 | "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
325 | "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
326 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
327 | "tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
328 | ]
329 |
330 | [[package]]
331 | name = "tokio-macros"
332 | version = "0.2.5"
333 | source = "registry+https://github.com/rust-lang/crates.io-index"
334 | dependencies = [
335 | "proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
336 | "quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
337 | "syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
338 | ]
339 |
340 | [[package]]
341 | name = "tokio-util"
342 | version = "0.2.0"
343 | source = "registry+https://github.com/rust-lang/crates.io-index"
344 | dependencies = [
345 | "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
346 | "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
347 | "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
348 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
349 | "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
350 | "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
351 | ]
352 |
353 | [[package]]
354 | name = "tower-service"
355 | version = "0.3.0"
356 | source = "registry+https://github.com/rust-lang/crates.io-index"
357 |
358 | [[package]]
359 | name = "try-lock"
360 | version = "0.2.2"
361 | source = "registry+https://github.com/rust-lang/crates.io-index"
362 |
363 | [[package]]
364 | name = "unicode-xid"
365 | version = "0.2.0"
366 | source = "registry+https://github.com/rust-lang/crates.io-index"
367 |
368 | [[package]]
369 | name = "want"
370 | version = "0.3.0"
371 | source = "registry+https://github.com/rust-lang/crates.io-index"
372 | dependencies = [
373 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
374 | "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
375 | ]
376 |
377 | [[package]]
378 | name = "winapi"
379 | version = "0.2.8"
380 | source = "registry+https://github.com/rust-lang/crates.io-index"
381 |
382 | [[package]]
383 | name = "winapi"
384 | version = "0.3.8"
385 | source = "registry+https://github.com/rust-lang/crates.io-index"
386 | dependencies = [
387 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
388 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
389 | ]
390 |
391 | [[package]]
392 | name = "winapi-build"
393 | version = "0.1.1"
394 | source = "registry+https://github.com/rust-lang/crates.io-index"
395 |
396 | [[package]]
397 | name = "winapi-i686-pc-windows-gnu"
398 | version = "0.4.0"
399 | source = "registry+https://github.com/rust-lang/crates.io-index"
400 |
401 | [[package]]
402 | name = "winapi-x86_64-pc-windows-gnu"
403 | version = "0.4.0"
404 | source = "registry+https://github.com/rust-lang/crates.io-index"
405 |
406 | [[package]]
407 | name = "ws2_32-sys"
408 | version = "0.2.1"
409 | source = "registry+https://github.com/rust-lang/crates.io-index"
410 | dependencies = [
411 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
412 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
413 | ]
414 |
415 | [metadata]
416 | "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
417 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
418 | "checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
419 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
420 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
421 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
422 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
423 | "checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8"
424 | "checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a"
425 | "checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6"
426 | "checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27"
427 | "checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5"
428 | "checksum h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9d5c295d1c0c68e4e42003d75f908f5e16a1edd1cbe0b0d02e4dc2006a384f47"
429 | "checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b"
430 | "checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b"
431 | "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9"
432 | "checksum hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e7b15203263d1faa615f9337d79c1d37959439dc46c2b4faab33286fadc2a1c5"
433 | "checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2"
434 | "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
435 | "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
436 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
437 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
438 | "checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8"
439 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
440 | "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
441 | "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f"
442 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
443 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
444 | "checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c"
445 | "checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f"
446 | "checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"
447 | "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587"
448 | "checksum proc-macro2 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435"
449 | "checksum quote 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
450 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
451 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
452 | "checksum syn 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859"
453 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
454 | "checksum tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "0fa5e81d6bc4e67fe889d5783bd2a128ab2e0cfa487e0be16b6a8d177b101616"
455 | "checksum tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389"
456 | "checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930"
457 | "checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860"
458 | "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382"
459 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
460 | "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
461 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
462 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
463 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
464 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
465 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
466 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
467 |
--------------------------------------------------------------------------------