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 {
6262 self . run ( factory: factory)
6363 }
6464
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+
6573 // for testing and internal use
6674 @discardableResult
6775 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 {
3636 static let invokedFunctionARN = " Lambda-Runtime-Invoked-Function-Arn "
3737}
3838
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-
4739/// Helper function to trap signals
4840internal func trap( signal sig: Signal , handler: @escaping ( Signal ) -> Void ) -> DispatchSourceSignal {
4941 let signalSource = DispatchSource . makeSignalSource ( signal: sig. rawValue, queue: DispatchQueue . global ( ) )
You can’t perform that action at this time.
0 commit comments