vapor / async-kit

Sugary extensions for the SwiftNIO library
MIT License
71 stars 25 forks source link

Get-Only Access of Source Properties from Connection Pools #44

Closed calebkleveter closed 4 years ago

calebkleveter commented 4 years ago

This PR adds a .sourceInfo property to the EventLoopConnectionPool and EventLoopGroupConnectionPool types. The .sourceInfo property is of type SourceInformation<Source>.

The SourceInformation type is dynamicMemberAccessible, where the subscript takes in a KeyPath<Source, Property>. This allows get-only access to properties on the private .source property in the connection pool types that you can access in your current scope (so public or internal depending on whether you are in the module that defines the Source type).

Checklist

calebkleveter commented 4 years ago

I just fixed that issue, so the CI should actually run now. 😄