summaryrefslogtreecommitdiff
path: root/src/data/base-source.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/base-source.js')
-rw-r--r--src/data/base-source.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/data/base-source.js b/src/data/base-source.js
new file mode 100644
index 0000000..55dbdc3
--- /dev/null
+++ b/src/data/base-source.js
@@ -0,0 +1,21 @@
+export class BaseSource {
+ constructor(config = {}) {
+ this.config = { ...config };
+ this.running = false;
+ }
+
+ start() {
+ this.running = true;
+ }
+
+ stop() {
+ this.running = false;
+ }
+
+ updateConfig(nextConfig) {
+ this.config = {
+ ...this.config,
+ ...nextConfig,
+ };
+ }
+}