swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.13k stars 102 forks source link

!context reordering context towards common guideline / style for context passing #136

Closed ktoso closed 3 years ago

ktoso commented 4 years ago

PR for discussing and potentially merging the context reordering, in accordance with some guidelines around context passing style we're trying to align SSWG projects on.

This is not yet set in stone but since I had a moment between bigger tasks wanted to get this PR out of the way so we can sit on it for a bit.

Motivation:

This PR contains the full writeup of the guidelines we are considering for contexts in general: https://github.com/slashmo/gsoc-swift-baggage-context/pull/2/files

It's about the baggage context but it applies to contexts in general, and I think we're pretty close to aligning many libs to this style; including gRPC (already is), HTTPClient (kind of is, with Logger today and baggage context in the future) other Lambda SDKs as well.

Modifications:

Reorder context parameter.

Result:

tomerd commented 3 years ago

hi @ktoso if you want to keep this around, could you please update this PR to be against the main branch so we can delete the old master branch