Class: Connection

Connection(url, optionsopt)

Represents a single connection to a Gremlin Server.

Constructor

new Connection(url, optionsopt)

Creates a new instance of Connection.
Parameters:
Name Type Attributes Description
url String The resource uri.
options Object <optional>
The connection options.
Properties
Name Type Attributes Description
ca Array <optional>
Trusted certificates.
cert String | Array | Buffer <optional>
The certificate key.
mimeType String <optional>
The mime type to use.
pfx String | Buffer <optional>
The private key, certificate, and CA certs.
reader GraphSONReader <optional>
The reader to use.
rejectUnauthorized Boolean <optional>
Determines whether to verify or not the server certificate.
traversalSource String <optional>
The traversal source. Defaults to: 'g'.
writer GraphSONWriter <optional>
The writer to use.
authenticator Authenticator <optional>
The authentication handler to use.
headers Object <optional>
An associative array containing the additional header key/values for the initial request.
enableUserAgentOnConnect Boolean <optional>
Determines if a user agent will be sent during connection handshake. Defaults to: true
agent http.Agent <optional>
The http.Agent implementation to use.
enableCompression Boolean <optional>
Enable per-message deflate compression. Defaults to: false.
Source:

Members

mimeType :String

Gets the MIME type.
Type:
  • String
Source:

Methods

close() → {Promise}

Closes the Connection.
Source:
Returns:
Type
Promise

(async) open() → {Promise}

Opens the connection, if its not already opened.
Source:
Returns:
Type
Promise

stream()

Source:

submit()

Source: