Options
All
  • Public
  • Public/Protected
  • All
Menu

Liftbridge Node.js Client API

Index

Partition Type aliases

BuiltinPartitioners

BuiltinPartitioners: object

All available builtin partitioners.

Type declaration

PartitionerLike

PartitionerLike: object

Pluggable partitioner that must be an implementation of BasePartitioner.

Type declaration

Error Object literals

Const ErrorCodes

ErrorCodes: object

Liftbridge error codes.

All errors include a code field that will include a unique code for the error which can be handled gracefully.

example

Handling a custom error.

import LiftbridgeClient from 'liftbridge';
import { ErrorCodes } from 'liftbridge/errors';

try {
     const client = new LiftbridgeClient([]);
} catch (err) {
     if (err.code === ErrorCodes.ERR_NO_ADDRESSES) {
         // NoAddressesError thrown. Now handle this.
     }
}

Partition Object literals

Const builtinPartitioners

builtinPartitioners: object

Builtin partioners as simple strings.

key

key: KeyPartitioner = KeyPartitioner

roundrobin

roundrobin: RoundRobinPartitioner = RoundRobinPartitioner