Skip to content

@node-net/netconf/operations/notifications ​

RFC 5277 event notifications: subscribe to an event stream and read its notifications with for await.

ts
import { notifications } from '@node-net/netconf/operations/notifications';

const client = await connect({ transport, extensions: [notifications] });
await using sub = await client.ops.notifications.createSubscription({ stream: 'NETCONF' });
for await (const n of sub) console.log(n.eventTime, n.event?.name);

Rules RFC 5277 imposes, enforced here before anything is sent:

  • One subscription per session, and it can't be cancelled: it lasts until its stopTime (the server then sends <notificationComplete>) or until the session ends. Disposing a Subscription only stops delivery to you.
  • Without :interleave, the server accepts nothing but <close-session> on a subscribed session, so the client refuses other operations with CapabilityError while the subscription lasts. Use a dedicated session.

See RFC 5277 event notifications.

Classes ​

Interfaces ​

Type Aliases ​

Variables ​

Functions ​

References ​

Notification ​

Re-exports Notification


NOTIFICATION_NS ​

Re-exports NOTIFICATION_NS

Released under the MIT Licence.