const makePusherDirver = (app_key: string, configuration: Config): Driver<Stream<PayloadInput>, PusherSource>
interface PusherSource {
select(channelName: string, eventName: string): Stream<any>;
}
interface PayloadOutput {
channelName: string;
eventName: string;
data: any;
}
interface PayloadInput {
channelName: string;
eventName: string;
data: any;
}
function main(sources) {
const content$ = sources.pusher.select("channel1", "event1")
const payload$ = Stream.of({
channelName: "channel1",
eventName: "client-event1",
data: { "key": "value" }
});
return {
pusher: payload$
};
}
const app_key = "";
const config = {
encrypted: true
};
run(main, {
pusher: makePusherDirver(app_key, config)
});
see example directory for real usage.