[GODRIVER-1759] Share some codecs between encoding and decoding Created: 29/Sep/20  Updated: 30/Mar/22

Status: Backlog
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Some codecs like StructCodec implement both ValueEncoder and ValueDecoder. In a single Registry, we can share a StructCodec instance between encoding and decoding. However, after GODRIVER-1751 is done, this won't be the case because we construct a new instance in RegisterDefaultEncoders and RegisterDefaultDecoders. We should consider adding a third registration function like RegisterSharedCodecs to handle shared instances.


Generated at Thu Feb 08 08:37:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.