Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CouchbaseConnectionResolver

Helper class that resolves Couchbase connection and credential parameters, validates them and generates a connection URI.

It is able to process multiple connections to Couchbase cluster nodes.

Configuration parameters

  • connection(s):
    • discovery_key: (optional) a key to retrieve the connection from IDiscovery
    • host: host name or IP address
    • port: port number (default: 27017)
    • database: database (bucket) name
    • uri: resource URI or connection string with all parameters in it
  • credential(s):
    • store_key: (optional) a key to retrieve the credentials from ICredentialStore
    • username: user name
    • password: user password

References

  • *:discovery:*:*:1.0 (optional) IDiscovery services
  • *:credential-store:*:*:1.0 (optional) Credential stores to resolve credentials

Hierarchy

  • CouchbaseConnectionResolver

Implements

  • any
  • any

Index

Properties

Protected _connectionResolver

_connectionResolver: ConnectionResolver = new ConnectionResolver()

The connections resolver.

Protected _credentialResolver

_credentialResolver: CredentialResolver = new CredentialResolver()

The credentials resolver.

Methods

configure

  • configure(config: ConfigParams): void
  • Configures component by passing configuration parameters.

    Parameters

    • config: ConfigParams

      configuration parameters to be set.

    Returns void

resolve

  • resolve(correlationId: string, callback: function): void
  • Resolves Couchbase connection URI from connection and credential parameters.

    Parameters

    • correlationId: string

      (optional) transaction id to trace execution through call chain.

    • callback: function

      callback function that receives resolved URI or error.

    Returns void

setReferences

  • setReferences(references: IReferences): void
  • Sets references to dependent components.

    Parameters

    • references: IReferences

      references to locate the component dependencies.

    Returns void

Generated using TypeDoc