forked from Azure/azure-functions-host
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to GenericWorkerProvider (Azure#2975)
* Remove NodeWorkerProvider, Add support for parsing language Worker Arguments
- Loading branch information
1 parent
ebd9236
commit d95653b
Showing
29 changed files
with
412 additions
and
378 deletions.
There are no files selected for viewing
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 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,53 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
using System.IO; | ||
using Newtonsoft.Json; | ||
|
||
namespace Microsoft.Azure.WebJobs.Script.Abstractions | ||
{ | ||
public class WorkerDescription | ||
{ | ||
/// <summary> | ||
/// Gets or sets the name of the supported language. This is the same name as the IConfiguration section for the worker. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "language", Required = Required.Always)] | ||
public string Language { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the supported file extension type. Functions are registered with workers based on extension. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "extension", Required = Required.Always)] | ||
public string Extension { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the default executable path. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "defaultExecutablePath", Required = Required.Always)] | ||
public string DefaultExecutablePath { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the default path to the worker (relative to the bin/workers/{language} directory) | ||
/// </summary> | ||
[JsonProperty(PropertyName = "defaultWorkerPath", Required = Required.Always)] | ||
public string DefaultWorkerPath { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the default base directory for the worker | ||
/// </summary> | ||
[JsonProperty(PropertyName = "workerDirectory")] | ||
public string WorkerDirectory { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the default path to the worker (relative to the bin/workers/{language} directory) | ||
/// </summary> | ||
[JsonProperty(PropertyName = "arguments")] | ||
public List<string> Arguments { get; set; } | ||
|
||
public string GetWorkerPath() | ||
{ | ||
return Path.Combine(WorkerDirectory, DefaultWorkerPath); | ||
} | ||
} | ||
} |
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 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 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 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 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
Oops, something went wrong.