ricochet-go/rpc
John Brooks 32230b77c1 core: Reuse protobuf structures for configuration
The existing configuration was partially compatible with Ricochet's,
but not enough to actually be useful. It also required a bunch of
boilerplate code to copy data between configuration data structures,
internal data structures, and RPC data structures.

Protobuf conveniently supports encoding messages to JSON, and we already
need to store most data (e.g. contacts) in protobuf structures. This
commit changes the configuration to be a protobuf JSON serialization of
the Config message, which can directly reuse RPC messages like Contact.

Additionally, the RWMutex-based configuration type was a deadlock
waiting to happen. There is now a read-only clone of the configuration
available atomically at any time. Writers need an exclusive lock on the
ConfigFile object, which commits its changes to disk and readers on
unlock.
2017-09-24 16:59:44 -06:00
..
config.pb.go core: Reuse protobuf structures for configuration 2017-09-24 16:59:44 -06:00
config.proto core: Reuse protobuf structures for configuration 2017-09-24 16:59:44 -06:00
contact.pb.go core: Reuse protobuf structures for configuration 2017-09-24 16:59:44 -06:00
contact.proto core: Reuse protobuf structures for configuration 2017-09-24 16:59:44 -06:00
conversation.pb.go Update RPC generated code 2016-11-30 19:37:46 -08:00
conversation.proto core: Track unread state of received messages 2016-10-15 19:00:16 -06:00
core.pb.go Update RPC generated code 2016-11-30 19:37:46 -08:00
core.proto core: Remove outdated todo comments 2016-11-05 20:44:20 -06:00
identity.pb.go Update RPC generated code 2016-11-30 19:37:46 -08:00
identity.proto rpc: Draft more RPC API calls 2016-08-16 17:43:39 -07:00
network.pb.go Update RPC generated code 2016-11-30 19:37:46 -08:00
network.proto rpc: Draft more RPC API calls 2016-08-16 17:43:39 -07:00
rpc.go core: Reuse protobuf structures for configuration 2017-09-24 16:59:44 -06:00