Skip to main content

Interface: NativeConnectionPlugin

Experimental

Plugin to control the configuration of a native connection.

Plugins is an experimental feature; APIs may change without notice.

Accessors​

name​

Get Signature​

get name(): string

Experimental

Gets the name of this plugin.

Returns​

string

Methods​

configureNativeConnection()?​

optional configureNativeConnection(options): NativeConnectionOptions

Experimental

Hook called when creating a native connection to allow modification of configuration.

Parameters​

options​

NativeConnectionOptions

Returns​

NativeConnectionOptions


connectNative()?​

optional connectNative(options, next): Promise<NativeConnection>

Experimental

Hook that wraps NativeConnection.connect, e.g. to asynchronously modify the options before connecting or to use the connection afterward. Must call next to continue the connection process, and return the connection it returns.

Hooks are called in plugin order, after all configureNativeConnection hooks.

Parameters​

options​

NativeConnectionOptions

next​

(options) => Promise<NativeConnection>

Returns​

Promise<NativeConnection>