-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
916 additions
and
516 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,90 @@ | ||
import { IInputs } from '../lib/interface/interface'; | ||
export declare function start(inputs: IInputs): Promise<any>; | ||
/** | ||
* s eval <sub-command>\n | ||
* s eval <sub-command> | ||
* @pre_help | ||
* {"header":"Eval","content":"Power tuning online functions"} | ||
* @pre_help | ||
* {"header":"Document","content":"https://github.com/devsapp/fc/blob/main/docs/command/eval.md"} | ||
* @after_help | ||
* {"header": "SubCommand List", "content": [{"name":"start","summary":"Power tuning online functions, you can get help through [s cli fc eval start -h]"}]} | ||
* {"header": "SubCommand List", "content": [{"name":"start","summary":"Power tuning online functions; help command [s eval start -h]"}]} | ||
*/ | ||
export interface EvalInputsArgs { | ||
} | ||
/** | ||
* s start <options>\n | ||
* s eval start <options> | ||
* @pre_help | ||
* {"header":"Eval start","content":"Power tuning start"} | ||
* @pre_help | ||
* {"header":"Document","content":"https://github.com/devsapp/fc/blob/main/docs/command/eval.md"} | ||
* @after_help | ||
* {"ref":"GlobalParams"} | ||
* @after_help | ||
* {"ref":"GlobalDescribe"} | ||
* @example | ||
* {"header": "Examples with CLI","content": ["$ s cli fc eval start --region cn-hangzhou --function-name myFunctionName --service-name myServiceName --function-type event --eval-type memory --run-count 10 --payload-file ./payload.file --memory-size 128,256,512,1024 --access default","\n$ s cli fc start --region cn-hangzhou --function-name myFunctionName --service-name myServiceName --function-type http --eval-type memory --run-count 50 --payload 'hello world' --memory-size 128,256,512,1024 --method get --path '/login' --query 'a=1&b=2' --access default", "\n$ s cli fc start --region cn-hangzhou --function-name myFunctionName --service-name myServiceName --function-type event --eval-type concurrency --memory 1536 --concurrency-args 2,30,5 --rt 250 --payload-file ./payload.file --access default","\n$ s cli fc start --region cn-hangzhou --function-name myFunctionName --service-name myServiceName --function-type http --eval-type concurrency --memory 1536 --concurrency-args 2,20,5 --rt 250 --method get --path '/login' --query 'a=1&b=2' --access default"]} | ||
* {"header": "Examples with Yaml","content": ["$ s eval start --eval-type memory --run-count 10 --payload-file ./payload.file --memory-size 128,256,512,1024 ","$ s eval start --eval-type concurrency --memory 1536 --concurrency-args 2,20,5 --rt 250 --method get --path '/login' --query 'a=1&b=2'", "$ s eval start --eval-type concurrencyPostman --memory 1536 --concurrency-args 2,20,5 --rt 250 --payload-file ./postman.json"]} | ||
* @example | ||
* {"header": "Examples with CLI","content": ["$ s cli fc eval start --region cn-hangzhou --function-name functionName --service-name serviceName --eval-type memory --run-count 10 --payload 'hello world' --memory-size 128,256,512,1024 --access default", "$ s cli fc eval start --region cn-hangzhou --function-name functionName --service-name serviceName --eval-type concurrency --memory 1536 --concurrency-args 2,30,5 --rt 250 --method get --path '/login' --query 'a=1&b=2' --access default", "$ s cli fc eval start --region cn-hangzhou --function-name functionName --service-name serviceName --eval-type concurrencyPostman --memory 1536 --concurrency-args 2,20,5 --rt 250 --payload-file ./postman.json --access default"]} | ||
*/ | ||
export interface EvalStartInputsArgs { | ||
/** | ||
* Specify the region of alicloud | ||
* @alias r | ||
*/ | ||
* [C-Required] Specify the fc region, value: cn-hangzhou/cn-beijing/cn-beijing/cn-hangzhou/cn-shanghai/cn-qingdao/cn-zhangjiakou/cn-huhehaote/cn-shenzhen/cn-chengdu/cn-hongkong/ap-southeast-1/ap-southeast-2/ap-southeast-3/ap-southeast-5/ap-northeast-1/eu-central-1/eu-west-1/us-west-1/us-east-1/ap-south-1 | ||
*/ | ||
region: string; | ||
/** | ||
* Specify the alicloud fc service name | ||
*/ | ||
* [C-Required] Specify the fc service name | ||
*/ | ||
'service-name': string; | ||
/** | ||
* Specify the alicloud fc function name | ||
* [C-Required] Specify the fc function name | ||
*/ | ||
'function-name'?: string; | ||
/** | ||
* Type of the power tuning, including memory and concurrency | ||
*/ | ||
'eval-type': string; | ||
/** | ||
* Type of the target function, including event and http | ||
*/ | ||
'function-type': string; | ||
'function-name': string; | ||
/** | ||
* Number of Invoke Function, only for --eval-type memory | ||
*/ | ||
'run-count': number; | ||
/** | ||
* Function MemorySize List of power tuning, only for --eval-type memory | ||
*/ | ||
'memory-size': string; | ||
/** | ||
* Concurrency args of power tuning that can convert to concurrency list, only for --eval-type concurrency | ||
*/ | ||
* [Optional] Concurrency args of power tuning that can convert to concurrency list, for --eval-type concurrency or concurrencyPostman | ||
*/ | ||
'concurrency-args': string; | ||
/** | ||
* Function memory of power tuning, only for --eval-type concurrency | ||
*/ | ||
'memory': number; | ||
* [Optional] Type of the power tuning, value: memory/concurrency/concurrencyPostman | ||
*/ | ||
'eval-type': string; | ||
/** | ||
* Max response time, only for --eval-type concurrency | ||
*/ | ||
'rt': number; | ||
* [Optional] Function MemorySize List of power tuning, only for --eval-type memory | ||
*/ | ||
'memory-size': string; | ||
/** | ||
* Target method, only for --function-type http | ||
*/ | ||
* [Optional] Target method, only for HTTP function | ||
*/ | ||
'method': string; | ||
/** | ||
* Target path, only for --function-type http | ||
*/ | ||
* [Optional] Target path, only for HTTP function | ||
*/ | ||
'path': string; | ||
/** | ||
* Target query, only for --function-type http | ||
*/ | ||
* [Optional] Target query, only for HTTP function | ||
*/ | ||
'query': string; | ||
/** | ||
* For --function-type event, represents the event passed to the function;\nFor --function-type http, represents the request body passed to the function | ||
*/ | ||
* [Optional] Target headers, only for HTTP function | ||
*/ | ||
'headers': string; | ||
/** | ||
* [Optional] Represents the event(Event function)/request_body(HTTP function) passed to the function | ||
*/ | ||
'payload': string; | ||
/** | ||
* For --function-type event, contains the event passed to the function;\nFor --function-type http, contains the request body passed to the function | ||
* @alias f | ||
*/ | ||
* [Optional] Represents the the event(Event function)/request_body(HTTP function)/postman-export-json-file which be readed from file to pass to the function | ||
*/ | ||
'payload-file': string; | ||
/** | ||
* [Optional] Max response time, only for --eval-type concurrency/concurrencyPostman | ||
*/ | ||
'rt': number; | ||
/** | ||
* [Optional] Number of Invoke Function, only for --eval-type memory | ||
*/ | ||
'run-count': number; | ||
/** | ||
* [Optional] Function memory of power tuning, only for --eval-type concurrency/concurrencyPostman | ||
*/ | ||
'memory': number; | ||
} |
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,27 +1,31 @@ | ||
/** | ||
* s cli fc fun2s <options>\n | ||
* s cli fc fun2s <options> | ||
* @pre_help | ||
* {"header":"Fun2s","content":"Convert fun into exclusive configuration"} | ||
* {"header":"Fun2s","content":"Convert the Yaml specification of Funcraft to the Yaml specification of Serverless Devs."} | ||
* @pre_help | ||
* {"header":"Document","content":"https://github.com/devsapp/fc/blob/main/docs/command/fun2s.md"} | ||
* @after_help | ||
* {"ref":"GlobalParams"} | ||
* @after_help | ||
* {"ref":"GlobalDescribe"} | ||
* @example | ||
* {"header": "Examples with CLI","content": ["$ s cli fc fun2s --region cn-shenzhen --target ./s.yml"]} | ||
* {"header": "Examples with CLI","content": ["$ s cli fc fun2s --region cn-shenzhen --target ./s.yaml"]} | ||
*/ | ||
export interface Fun2SInputsArgs { | ||
/** | ||
* Specify the region of alicloud | ||
* [Optional] Specify the fc region, value: cn-hangzhou/cn-beijing/cn-beijing/cn-hangzhou/cn-shanghai/cn-qingdao/cn-zhangjiakou/cn-huhehaote/cn-shenzhen/cn-chengdu/cn-hongkong/ap-southeast-1/ap-southeast-2/ap-southeast-3/ap-southeast-5/ap-northeast-1/eu-central-1/eu-west-1/us-west-1/us-east-1/ap-south-1 | ||
*/ | ||
region?: string; | ||
/** | ||
* Specify fun configuration path(default: template.[yaml|yml]) | ||
* [Optional] Specify Funcraft configuration path, default: template.yaml/template.yml | ||
*/ | ||
source?: string; | ||
/** | ||
* Specify serverless devs configuration path(default: s.yaml) | ||
* [Optional] Specify Serverless Devs configuration path, default: s.yaml | ||
*/ | ||
target?: string; | ||
/** | ||
* Mandatory overwrite s file | ||
* [Optional] Mandatory overwrite s file | ||
*/ | ||
force?: string; | ||
force?: boolean; | ||
} |
Oops, something went wrong.