Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1759

Share some codecs between encoding and decoding

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: