Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): add brokers interface #585

Merged
merged 5 commits into from
Feb 24, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions aedes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ declare namespace aedes {

type PublishedHandler = (packet: AedesPublishPacket, client: Client, callback: (error?: Error | null) => void) => void

type LastHearthbeatTimestamp = Date;

interface Brokers {
[brokerId: string]: LastHearthbeatTimestamp;
}

interface AedesOptions {
mq?: any
id?: string
Expand All @@ -101,6 +107,7 @@ declare namespace aedes {
id: string
connectedClients: number
closed: boolean
brokers: Brokers

handle: (stream: Connection) => Client

Expand Down