Home Reference Source Test

Function

Static Public Summary
public

async fetchgossipJson(host: , port: , useHttps: , timeout: , log: bunyan)

tries to fetch gossip json information from given ip and port

public

async getIpAndPort(currentSettings: EventstoreSettings, log: bunyan)

Updates connection information depending on given settings

public

async getIpListFromDns(dnsServer: , log: bunyan)

public

getMasterNodeInfo(gossipInfo: )

Searches for master node inside of gossip json

public

getRandomNodeInfo(gossipInfo: )

Gets a random cluster node from gossip json

public

newAccessDeniedError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreAccessDeniedError

public

newAlreadyExistError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreAlreadyExistError

public

newBadRequestError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreBadRequestError

public

newCommitTimeoutError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreCommitTimeoutError

public

newConnectionError(message: , rootCause: Error | null)

public

newDoesNotExistError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreDoesNotExistError

public

newForwardTimeoutError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreForwardTimeoutError

public

newImplementationError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreImplementationError

public

newInvalidTransactionError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreInvalidTransactionError

public

newNoStreamError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreNoStreamError

public

newNotAuthenticatedError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreNotAuthenticatedError

public

newNotFoundError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreNotFoundError

public

newNotHandledError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreNotHandledError

public

newNotModifiedError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreNotModifiedError

public

newOperationError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreOperationError

public

newPrepareTimeoutError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstorePrepareTimeoutError

public

newProtocolError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreProtocolError

public

newStreamDeletedError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreStreamDeletedError

public

newTimeoutError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreTimeoutError

public

newUnspecificError(message: string, rootCause: Error | null)

Returns new EventstoreError type of EventstoreUnspecificError

public

newWrongExpectedVersionError(message: , rootCause: Error | null)

Returns new EventstoreError type of EventstoreWrongExpectedVersionError

public

Generates settings for connecting to eventstore

public

setPersistentSubscriptionConfig(customSettings: object | PersistentSubscriptionConfig)

merges given settings with default settings

public

uuidFromBuffer(buffer: Buffer)

Converts a uuid as string from buffer It returns an empty string for uuid set to null or throws EventstoreProtocolError for invalid buffer length

public

Converts a uuid string to buffer representation throws EventstoreProtocolError for invalid input string length

Static Public

public async fetchgossipJson(host: , port: , useHttps: , timeout: , log: bunyan) source

tries to fetch gossip json information from given ip and port

Params:

NameTypeAttributeDescription
host
port
useHttps
timeout
log bunyan

public async getIpAndPort(currentSettings: EventstoreSettings, log: bunyan) source

Updates connection information depending on given settings

Params:

NameTypeAttributeDescription
currentSettings EventstoreSettings
log bunyan

public async getIpListFromDns(dnsServer: , log: bunyan) source

Params:

NameTypeAttributeDescription
dnsServer
log bunyan

public getMasterNodeInfo(gossipInfo: ) source

Searches for master node inside of gossip json

Params:

NameTypeAttributeDescription
gossipInfo

public getRandomNodeInfo(gossipInfo: ) source

Gets a random cluster node from gossip json

Params:

NameTypeAttributeDescription
gossipInfo

public newAccessDeniedError(message: , rootCause: Error | null) source

import {newAccessDeniedError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreAccessDeniedError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newAlreadyExistError(message: string, rootCause: Error | null) source

import {newAlreadyExistError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreAlreadyExistError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default: Already exists
rootCause Error | null
  • optional
  • default: null

public newBadRequestError(message: string, rootCause: Error | null) source

import {newBadRequestError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreBadRequestError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default: Bad Request
rootCause Error | null
  • optional
  • default: null

public newCommitTimeoutError(message: , rootCause: Error | null) source

import {newCommitTimeoutError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreCommitTimeoutError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newConnectionError(message: , rootCause: Error | null) source

import {newConnectionError} from 'eventstore-ts-client/src/errors/index.ts'

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newDoesNotExistError(message: string, rootCause: Error | null) source

import {newDoesNotExistError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreDoesNotExistError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default: Does not exist
rootCause Error | null
  • optional
  • default: null

public newForwardTimeoutError(message: , rootCause: Error | null) source

import {newForwardTimeoutError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreForwardTimeoutError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newImplementationError(message: string, rootCause: Error | null) source

import {newImplementationError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreImplementationError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default:
rootCause Error | null
  • optional
  • default: null

public newInvalidTransactionError(message: , rootCause: Error | null) source

import {newInvalidTransactionError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreInvalidTransactionError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newNoStreamError(message: , rootCause: Error | null) source

import {newNoStreamError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreNoStreamError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newNotAuthenticatedError(message: string, rootCause: Error | null) source

import {newNotAuthenticatedError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreNotAuthenticatedError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default: Not Authenticated
rootCause Error | null
  • optional
  • default: null

public newNotFoundError(message: , rootCause: Error | null) source

import {newNotFoundError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreNotFoundError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newNotHandledError(message: , rootCause: Error | null) source

import {newNotHandledError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreNotHandledError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newNotModifiedError(message: , rootCause: Error | null) source

import {newNotModifiedError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreNotModifiedError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newOperationError(message: string, rootCause: Error | null) source

import {newOperationError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreOperationError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default:
rootCause Error | null
  • optional
  • default: null

public newPrepareTimeoutError(message: , rootCause: Error | null) source

import {newPrepareTimeoutError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstorePrepareTimeoutError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newProtocolError(message: , rootCause: Error | null) source

import {newProtocolError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreProtocolError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newStreamDeletedError(message: , rootCause: Error | null) source

import {newStreamDeletedError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreStreamDeletedError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public newTimeoutError(message: string, rootCause: Error | null) source

import {newTimeoutError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreTimeoutError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default:
rootCause Error | null
  • optional
  • default: null

public newUnspecificError(message: string, rootCause: Error | null) source

import {newUnspecificError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreUnspecificError

Params:

NameTypeAttributeDescription
message string
  • optional
  • default:
rootCause Error | null
  • optional
  • default: null

public newWrongExpectedVersionError(message: , rootCause: Error | null) source

import {newWrongExpectedVersionError} from 'eventstore-ts-client/src/errors/index.ts'

Returns new EventstoreError type of EventstoreWrongExpectedVersionError

Params:

NameTypeAttributeDescription
message
rootCause Error | null
  • optional
  • default: null

public setConnectionSettings(customSettings: object | EventstoreSettings) source

import {setConnectionSettings} from 'eventstore-ts-client/src/eventstore/EventstoreSettings.ts'

Generates settings for connecting to eventstore

Params:

NameTypeAttributeDescription
customSettings object | EventstoreSettings

public setPersistentSubscriptionConfig(customSettings: object | PersistentSubscriptionConfig) source

import {setPersistentSubscriptionConfig} from 'eventstore-ts-client/src/subscription/PersistentSubscriptionConfig.ts'

merges given settings with default settings

Params:

NameTypeAttributeDescription
customSettings object | PersistentSubscriptionConfig

public uuidFromBuffer(buffer: Buffer) source

Converts a uuid as string from buffer It returns an empty string for uuid set to null or throws EventstoreProtocolError for invalid buffer length

Params:

NameTypeAttributeDescription
buffer Buffer

public uuidToBuffer(uuid: string | null) source

Converts a uuid string to buffer representation throws EventstoreProtocolError for invalid input string length

Params:

NameTypeAttributeDescription
uuid string | null