diff --git a/examples/pubsub/events/list.ts b/examples/pubsub/events/list.ts new file mode 100644 index 0000000..3760ab3 --- /dev/null +++ b/examples/pubsub/events/list.ts @@ -0,0 +1,18 @@ +import { Config, Utils, EventsClient } from '../../../src'; + +const opts: Config = { + address: 'localhost:50000', + clientId: Utils.uuid(), + reconnectInterval: 1000, +}; +const eventsClient = new EventsClient(opts); +async function list(search: string) { + const channels = await eventsClient.list(search); + console.log(channels); +} + +async function main() { + await list('e1'); + // wait for receiver +} +main(); diff --git a/examples/pubsub/events_store/list.ts b/examples/pubsub/events_store/list.ts new file mode 100644 index 0000000..957c8d4 --- /dev/null +++ b/examples/pubsub/events_store/list.ts @@ -0,0 +1,18 @@ +import { Config, Utils, EventsStoreClient } from '../../../src'; + +const opts: Config = { + address: 'localhost:50000', + clientId: Utils.uuid(), + reconnectInterval: 1000, +}; +const eventsStoreClient = new EventsStoreClient(opts); +async function list(search: string) { + const channels = await eventsStoreClient.list(search); + console.log(channels); +} + +async function main() { + await list(''); + // wait for receiver +} +main(); diff --git a/examples/queues/list.ts b/examples/queues/list.ts new file mode 100644 index 0000000..5293a18 --- /dev/null +++ b/examples/queues/list.ts @@ -0,0 +1,18 @@ +import { Config, Utils, QueuesClient } from '../../src'; + +const opts: Config = { + address: 'localhost:50000', + clientId: Utils.uuid(), + reconnectInterval: 1000, +}; +const queuesClient = new QueuesClient(opts); +async function list(search: string) { + const channels = await queuesClient.list(search); + console.log(channels); +} + +async function main() { + await list(''); + // wait for receiver +} +main(); diff --git a/examples/rpc/commnds/list.ts b/examples/rpc/commnds/list.ts new file mode 100644 index 0000000..9bad481 --- /dev/null +++ b/examples/rpc/commnds/list.ts @@ -0,0 +1,18 @@ +import { Config, Utils, CommandsClient } from '../../../src'; + +const opts: Config = { + address: 'localhost:50000', + clientId: Utils.uuid(), + reconnectInterval: 1000, +}; +const commandsClient = new CommandsClient(opts); +async function list(search: string) { + const channels = await commandsClient.list(search); + console.log(channels); +} + +async function main() { + await list(''); + // wait for receiver +} +main(); diff --git a/examples/rpc/queries/list.ts b/examples/rpc/queries/list.ts new file mode 100644 index 0000000..1ce66e3 --- /dev/null +++ b/examples/rpc/queries/list.ts @@ -0,0 +1,18 @@ +import { Config, Utils, QueriesClient } from '../../../src'; + +const opts: Config = { + address: 'localhost:50000', + clientId: Utils.uuid(), + reconnectInterval: 1000, +}; +const queriesClient = new QueriesClient(opts); +async function list(search: string) { + const channels = await queriesClient.list(search); + console.log(channels); +} + +async function main() { + await list(''); + // wait for receiver +} +main();