Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IOptions

IOptions are passed into the client constructor to configure how the client connects to etcd. It supports defining multiple servers and configuring how load is balanced between those servers.

Hierarchy

  • IOptions

Index

Properties

Optional auth

auth: undefined | object

Etcd password auth, if using.

Optional backoffStrategy

backoffStrategy: IBackoffStrategy

Backoff strategy to use for connecting to hosts. Defaults to an exponential strategy, starting at a 500 millisecond retry with a 30 second max.

Optional credentials

credentials: undefined | object

Optional client cert credentials for talking to etcd. Describe more here, passed into the createSsl function in GRPC here.

Optional dialTimeout

dialTimeout: undefined | number

Duration in milliseconds to wait while connecting before timing out. Defaults to 30 seconds.

Optional grpcOptions

grpcOptions: ChannelOptions

Internal options to configure the GRPC client. These are channel options as enumerated in their C++ documentation. For example:

const etcd = new Etcd3({
  // ...
  grpcOptions: {
    'grpc.http2.max_ping_strikes': 3,
  },
})

hosts

hosts: string[] | string

A list of hosts to connect to. Hosts should include the https?:// prefix.

Optional retry

retry: undefined | true | false

Whether, if a query fails as a result of a primitive GRPC error, to retry it on a different server (provided one is available). This can make service disruptions less-severe but can cause a domino effect if a particular operation causes a failure that grpc reports as some sort of internal or network error.

Defaults to false.

Generated using TypeDoc