File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,14 @@ public enum Lambda {
44
44
self . run ( factory: factory)
45
45
}
46
46
47
+ /// Utility to access/read environment variables
48
+ public static func env( _ name: String ) -> String ? {
49
+ guard let value = getenv ( name) else {
50
+ return nil
51
+ }
52
+ return String ( cString: value)
53
+ }
54
+
47
55
// for testing and internal use
48
56
@discardableResult
49
57
internal static func run( configuration: Configuration = . init( ) , handler: ByteBufferLambdaHandler ) -> Result < Int , Error > {
Original file line number Diff line number Diff line change @@ -36,14 +36,6 @@ internal enum AmazonHeaders {
36
36
static let invokedFunctionARN = " Lambda-Runtime-Invoked-Function-Arn "
37
37
}
38
38
39
- /// Utility to read environment variables
40
- internal func env( _ name: String ) -> String ? {
41
- guard let value = getenv ( name) else {
42
- return nil
43
- }
44
- return String ( cString: value)
45
- }
46
-
47
39
/// Helper function to trap signals
48
40
internal func trap( signal sig: Signal , handler: @escaping ( Signal ) -> Void ) -> DispatchSourceSignal {
49
41
let signalSource = DispatchSource . makeSignalSource ( signal: sig. rawValue, queue: DispatchQueue . global ( ) )
You can’t perform that action at this time.
0 commit comments