Closed jcchavezs closed 7 years ago
:+1:
@jcchavezs do you mean that you're using standard types as carriers? E.g. in Python the carrier for the TextMap format is the default dictionary. If so, I think that's the right approach, but it doesn't seem to be mentioned in the documentation for the formats - see Go API that clearly states which carrier is expected with which format.
On a separate point, I would suggest implementing a Mock tracer (#40) so that changes like this can be validated in an actual implementation, rather than just the API.
This looks good to me. One question: for http headers, is []string more useful that [][]string? I don't think tracers will inject/extract more than one value per header. But if most http header implementations use [][]string perhaps we should match that? I believe I saw this discussed before, and []string is fine. Just double checking.
Can this be merged?
I wish this PR to be merged as early as possible.
@jcchavezs Would you like make a v0.x.x tag? I need to require a release, even it is unstable.
The next version is 1.0.0-beta.2
ping @jcchavezs
@tedsuo so most implementations use string[][]
, problem is that there are different ways to get headers, for example getallheaders will return string[]
having duplicated values glued by a comma whereas the PSR7 implementation returns a string[][]
. I believe every vendor would setup something that works for them based on their propagation model.
This PR removes carriers (and interfaces Reader and Writer) as suggested by @lvht.
Reasons are:
Ping @felixfbecker @beberlei @lvht @tedsuo @yurishkuro @tedsuo
Closes #37