File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Sources/AWSLambdaRuntimeCore Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ public enum Lambda {
62
62
self . run ( factory: factory)
63
63
}
64
64
65
+ /// Utility to access/read environment variables
66
+ public static func env( _ name: String ) -> String ? {
67
+ guard let value = getenv ( name) else {
68
+ return nil
69
+ }
70
+ return String ( cString: value)
71
+ }
72
+
65
73
// for testing and internal use
66
74
@discardableResult
67
75
internal static func run( configuration: Configuration = . init( ) , handler: Handler ) -> 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