Interface: Extension<Id, Ops, Content>
Defined in: netconf/src/operations/extension.ts:211
An extension: an optional NETCONF feature enabled per connection with connect({ extensions: [...] }). The library's own (such as monitoring and nmda) are built with defineExtension, as yours can be. See Extensions and Writing your own.
Type Parameters
Id
Id extends string = string
Ops
Ops extends object = object
Content
Content extends object = object
Properties
augments?
readonly augments?: readonly Augment[];Defined in: netconf/src/operations/extension.ts:248
Parameters this extension adds to base operations.
clientCapabilities?
readonly clientCapabilities?: readonly string[];Defined in: netconf/src/operations/extension.ts:219
Capabilities added to our <hello>.
description?
readonly description?: string;Defined in: netconf/src/operations/extension.ts:215
A one-line summary of what the extension adds, for tools and help text.
descriptors?
readonly descriptors?: readonly OperationDescriptor[];Defined in: netconf/src/operations/extension.ts:238
Descriptors for the RPCs this extension adds (each needs a builder in requests), and for its reads (kind: 'read', run through the method of content they name).
id
readonly id: Id;Defined in: netconf/src/operations/extension.ts:213
Becomes client.ops.<id> and client.content.<id>, for the layers the extension contributes to.
requests?
readonly requests?: Readonly<Record<string, RequestBuilder<never>>>;Defined in: netconf/src/operations/extension.ts:246
Builders for the RPCs in descriptors, by RPC name. Each may type its own arguments ((args: { readonly name: string }) => …): the client calls it only with arguments whose names its descriptor lists, so give the descriptor required and type to match, and check values a tool could send wrongly.
requires?
readonly requires?: readonly string[];Defined in: netconf/src/operations/extension.ts:217
Capabilities the server must advertise, checked after the hello under capabilityCheck.
Methods
content()?
content?(ctx): Content;Defined in: netconf/src/operations/extension.ts:232
Content layer: called once per client, after the hello, with the same context as ops. The result becomes client.content.<id>: calls that hand back decoded, typed data. State shared with ops belongs in a WeakMap keyed by ctx.sessionKey.
Parameters
ctx
Returns
Content
ops()?
ops?(ctx): Ops;Defined in: netconf/src/operations/extension.ts:225
Operations layer: called once per client, after the hello. The result becomes client.ops.<id>: calls that send operations and hand back XML, a reply, or a handle on what they started (a subscription, a lock).
Parameters
ctx
Returns
Ops