mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Added Lambda Node support as part of the regular functions workflow. (#601)
* Added Lambda Node support as part of the regular functions workflow. * Fixes for PR comments.
This commit is contained in:
committed by
Seif Lotfy سيف لطفي
parent
0492ca5dfb
commit
ca18ae88fa
14
fn/deploy.go
14
fn/deploy.go
@@ -135,9 +135,9 @@ func (p *deploycmd) route(path string, ff *funcfile) error {
|
||||
return fmt.Errorf("error setting endpoint: %v", err)
|
||||
}
|
||||
|
||||
if ff.path == nil {
|
||||
if ff.Path == nil {
|
||||
_, path := appNamePath(ff.FullName())
|
||||
ff.path = &path
|
||||
ff.Path = &path
|
||||
}
|
||||
|
||||
if ff.Memory == nil {
|
||||
@@ -149,8 +149,8 @@ func (p *deploycmd) route(path string, ff *funcfile) error {
|
||||
if ff.Format == nil {
|
||||
ff.Format = new(string)
|
||||
}
|
||||
if ff.maxConcurrency == nil {
|
||||
ff.maxConcurrency = new(int)
|
||||
if ff.MaxConcurrency == nil {
|
||||
ff.MaxConcurrency = new(int)
|
||||
}
|
||||
if ff.Timeout == nil {
|
||||
dur := time.Duration(0)
|
||||
@@ -163,19 +163,19 @@ func (p *deploycmd) route(path string, ff *funcfile) error {
|
||||
}
|
||||
body := functions.RouteWrapper{
|
||||
Route: functions.Route{
|
||||
Path: *ff.path,
|
||||
Path: *ff.Path,
|
||||
Image: ff.FullName(),
|
||||
Memory: *ff.Memory,
|
||||
Type_: *ff.Type,
|
||||
Config: expandEnvConfig(ff.Config),
|
||||
Headers: headers,
|
||||
Format: *ff.Format,
|
||||
MaxConcurrency: int32(*ff.maxConcurrency),
|
||||
MaxConcurrency: int32(*ff.MaxConcurrency),
|
||||
Timeout: int32(ff.Timeout.Seconds()),
|
||||
},
|
||||
}
|
||||
|
||||
fmt.Fprintf(p.verbwriter, "updating API with app: %s route: %s name: %s \n", p.appName, *ff.path, ff.Name)
|
||||
fmt.Fprintf(p.verbwriter, "updating API with app: %s route: %s name: %s \n", p.appName, *ff.Path, ff.Name)
|
||||
|
||||
wrapper, resp, err := p.AppsAppRoutesPost(p.appName, body)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user