- changed title to broadcast: parameterise store access in broadcast functionality
broadcast: parameterise store access in broadcast functionality
From issue #257 we wish to increase modularity and testability of broadcast related functionality. As part of this, we wish to stop hardcoding usage of the “settingStore” and instead have functions use a “store” parameter of the interface type “iotds.Store”. This will allows us to swap out the settingStore implementation with other implementations depending on our desires, for example, we’ll be able to use dummyStore for testing purposes.
Comments (7)
-
reporter -
Alternatively, this could be achieved be modifying VidGrind’s setup function, where settingsStore is initialized, rather than replacing all instances of settingsStore.
-
reporter That could be a solution, but it feels like an abstraction leak. The broadcast stuff doesn’t need to depend on vidgrind’s setup function. It’s kind of annoying that we’ll have many of the broadcast related functions with a iotds.Store parameter, but I think we’d probably soon have a broadcastHandler struct that can hold onto this, and all the broadcast related functions would become methods of this struct.
-
I like the idea of a broadcast handler, or BroadcastManager, that encapsulates storage (and other details).
-
reporter - changed status to resolved
Merged in store-parameterisation (pull request #248)
broadcast: parameterise datastore value
Resolves issue
#258This change parameterises the store value as opposed to hardcoding the globally available settingsStore into functionality. We're doing this by adding a store parameter of iotds.Store type to broadcast related functions.
This change also involves updating of testing to accomodate these changes.
Approved-by: David Sutton Approved-by: Trek Hopton
→ <<cset d16de4994385>>
-
reporter Merged in store-parameterisation (pull request #248)
broadcast: parameterise datastore value
Resolves issue
#258This change parameterises the store value as opposed to hardcoding the globally available settingsStore into functionality. We're doing this by adding a store parameter of iotds.Store type to broadcast related functions.
This change also involves updating of testing to accomodate these changes.
Approved-by: David Sutton Approved-by: Trek Hopton
→ <<cset 01771eb9b143>>
-
Merged in store-parameterisation (pull request #248)
broadcast: parameterise datastore value
Resolves issue
#258This change parameterises the store value as opposed to hardcoding the globally available settingsStore into functionality. We're doing this by adding a store parameter of iotds.Store type to broadcast related functions.
This change also involves updating of testing to accomodate these changes.
Approved-by: David Sutton Approved-by: Trek Hopton
→ <<cset 080b081d58bd>>
- Log in to comment