Function
getLimits
(memorySet bool, logSizeSet bool, timeoutSet bool, concurrencySet bool, memory int, logSize int, timeout int, concurrency int)
Source from the content-addressed store, hash-verified
| 912 | } |
| 913 | |
| 914 | func getLimits(memorySet bool, logSizeSet bool, timeoutSet bool, concurrencySet bool, memory int, logSize int, timeout int, concurrency int) *whisk.Limits { |
| 915 | var limits *whisk.Limits |
| 916 | |
| 917 | if memorySet || logSizeSet || timeoutSet || concurrencySet { |
| 918 | limits = new(whisk.Limits) |
| 919 | |
| 920 | if memorySet { |
| 921 | limits.Memory = &memory |
| 922 | } |
| 923 | |
| 924 | if logSizeSet { |
| 925 | limits.Logsize = &logSize |
| 926 | } |
| 927 | |
| 928 | if timeoutSet { |
| 929 | limits.Timeout = &timeout |
| 930 | } |
| 931 | |
| 932 | if concurrencySet { |
| 933 | limits.Concurrency = &concurrency |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | return limits |
| 938 | } |
| 939 | |
| 940 | func nestedError(errorMessage string, err error) error { |
| 941 | return whisk.MakeWskErrorFromWskError( |
Tested by
no test coverage detected