Storage Refactor

Review Request #5 — Created Oct. 6, 2018 and discarded

sarah
cwtch
peerdata
dan
Storage Refactor


  • 3
  • 0
  • 2
  • 0
  • 5
Description From Last Updated
why the name change and now making the struct exported from the package? dan dan
I thought we were making a way for the app to supply the storage, not just rearranging? we supply base ... dan dan
which is where my old CR spent some time, and i didnt redo that there is only 1 field we ... dan dan
sarah
sarah
dan
  1. 
      
  2. app/app.go (Diff revision 2)
     
     

    shouldnt this be an array of the interface not the implementation?

  3. peer/cwtch_peer.go (Diff revision 2)
     
     

    why the name change and now making the struct exported from the package?

    1. We can't serialize an interface we need to serialize a concrete type, thus it needs to be exportable.

  4. storage/file_profile_store.go (Diff revision 2)
     
     

    lower case non exported struct
    have a capital case exported interface

  5. storage/file_profile_store.go (Diff revision 2)
     
     

    I thought we were making a way for the app to supply the storage, not just rearranging? we supply base logic with a gap the app fills with file logic?

    1. The first goal is to decouple Peer and Storage, which is what this CR does. The next step is reworking Application to inject a storage solution, but that is going to have a larger impact on both Application and the cli so I think it makes sense to separate them.

    2. ok

  6. 
      
sarah
dan
  1. 
      
  2. peer/cwtch_peer.go (Diff revision 3)
     
     
     
     

    which is where my old CR spent some time, and i didnt redo that

    there is only 1 field we are serializing, its Profile, and it is a exported struct from its package. the rest of Peer is admin stuff that isnt serialized. we prolly want to pivot to serializing the model.Profile struct, and then we can leave peer as a private struct of its package

  3. 
      
dan
Review request changed

Status: Discarded

Loading...