Store
. The constructor of a store implementation can do some initialization and configuration check, but must not access, or attempt to recover, the storage at this point. This is important because when the server runs on Fault Tolerance mode, the storage must be shared across many servers but only one server can be using it.Recover()
in order to recover the persisted state. For implementations that do not support persistence, such as the provided MemoryStore
, this call will simply return nil
(without error) to indicate that no state was recovered.Store
is used to add/delete clients, create/lookup channels, etc...ChannelStore
, which points to two other interfaces, the SubStore
and MsgStore
. These stores, for a given channel, handle subscriptions and messages respectively.Recover()
.