Add electron
This commit is contained in:
13
backend/src/DataSource/DataSource.ts
Normal file
13
backend/src/DataSource/DataSource.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { DataSourceState } from './'
|
||||
|
||||
type MessageCallback = (topic: string, payload: Buffer) => void
|
||||
|
||||
// A DataSource should automatically reconnect if connection was broken
|
||||
interface DataSource<DataSourceOptions> {
|
||||
connect(options: DataSourceOptions): DataSourceState
|
||||
disconnect(): void
|
||||
onMessage(messageCallback: MessageCallback): void
|
||||
topicSeparator: string
|
||||
}
|
||||
|
||||
export { DataSource, MessageCallback }
|
||||
Reference in New Issue
Block a user