mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
@@ -160,6 +160,10 @@ func (p *deploycmd) route(path string, ff *funcfile) error {
|
||||
ff.Timeout = &dur
|
||||
}
|
||||
|
||||
headers := make(map[string][]string)
|
||||
for k, v := range ff.Headers {
|
||||
headers[k] = []string{v}
|
||||
}
|
||||
body := functions.RouteWrapper{
|
||||
Route: functions.Route{
|
||||
Path: *ff.Path,
|
||||
@@ -167,7 +171,7 @@ func (p *deploycmd) route(path string, ff *funcfile) error {
|
||||
Memory: *ff.Memory,
|
||||
Type_: *ff.Type,
|
||||
Config: expandEnvConfig(ff.Config),
|
||||
Headers: ff.Headers,
|
||||
Headers: headers,
|
||||
Format: *ff.Format,
|
||||
MaxConcurrency: int32(*ff.MaxConcurrency),
|
||||
Timeout: int32(ff.Timeout.Seconds()),
|
||||
|
||||
@@ -32,20 +32,20 @@ type fftest struct {
|
||||
}
|
||||
|
||||
type funcfile struct {
|
||||
Name string `yaml:"name,omitempty",json:"name,omitempty"`
|
||||
Version string `yaml:"version,omitempty",json:"version,omitempty"`
|
||||
Runtime *string `yaml:"runtime,omitempty",json:"runtime,omitempty"`
|
||||
Entrypoint *string `yaml:"entrypoint,omitempty",json:"entrypoint,omitempty"`
|
||||
Path *string `yaml:"path,omitempty",json:"path,omitempty"`
|
||||
Type *string `yaml:"type,omitempty",json:"type,omitempty"`
|
||||
Memory *int64 `yaml:"memory,omitempty",json:"memory,omitempty"`
|
||||
Format *string `yaml:"format,omitempty",json:"format,omitempty"`
|
||||
Timeout *time.Duration `yaml:"timeout,omitempty",json:"timeout,omitempty"`
|
||||
MaxConcurrency *int `yaml:"max_concurrency,omitempty",json:"max_concurrency,omitempty"`
|
||||
Headers map[string][]string `yaml:"headers,omitempty",json:"headers,omitempty"`
|
||||
Config map[string]string `yaml:"config,omitempty",json:"config,omitempty"`
|
||||
Build []string `yaml:"build,omitempty",json:"build,omitempty"`
|
||||
Tests []fftest `yaml:"tests,omitempty",json:"tests,omitempty"`
|
||||
Name string `yaml:"name,omitempty",json:"name,omitempty"`
|
||||
Version string `yaml:"version,omitempty",json:"version,omitempty"`
|
||||
Runtime *string `yaml:"runtime,omitempty",json:"runtime,omitempty"`
|
||||
Entrypoint *string `yaml:"entrypoint,omitempty",json:"entrypoint,omitempty"`
|
||||
Path *string `yaml:"path,omitempty",json:"path,omitempty"`
|
||||
Type *string `yaml:"type,omitempty",json:"type,omitempty"`
|
||||
Memory *int64 `yaml:"memory,omitempty",json:"memory,omitempty"`
|
||||
Format *string `yaml:"format,omitempty",json:"format,omitempty"`
|
||||
Timeout *time.Duration `yaml:"timeout,omitempty",json:"timeout,omitempty"`
|
||||
MaxConcurrency *int `yaml:"max_concurrency,omitempty",json:"max_concurrency,omitempty"`
|
||||
Headers map[string]string `yaml:"headers,omitempty",json:"headers,omitempty"`
|
||||
Config map[string]string `yaml:"config,omitempty",json:"config,omitempty"`
|
||||
Build []string `yaml:"build,omitempty",json:"build,omitempty"`
|
||||
Tests []fftest `yaml:"tests,omitempty",json:"tests,omitempty"`
|
||||
}
|
||||
|
||||
func (ff *funcfile) FullName() string {
|
||||
|
||||
Reference in New Issue
Block a user