Nestjs Etcd3
Etcd3 for NestJs.
Installation
Yarn
yarn add nestjs-etcd3
NPM
npm install nestjs-etcd3 --save
Getting Started
Let's register the EtcdModule in app.module.ts
import { Module } from '@nestjs/common'
import { EtcdModule} from 'nestjs-etcd3'
@Module({
imports: [
EtcdModule.root({
hosts: 'http://127.0.0.1:2379',
}),
],
})
export class AppModule {}
Options
interface EtcdModuleOptions {
credentials?: {
rootCertificate: Buffer;
privateKey?: Buffer;
certChain?: Buffer;
};
grpcOptions?: ChannelOptions;
auth?: {
username: string;
password: string;
};
hosts: string[] | string;
dialTimeout?: number;
backoffStrategy?: IBackoffStrategy;
retry?: boolean;
}
That's it!