# pool

TIP

This section of sample tedisPool as TedisPool instance object, demonstration part omitted async function of the external layer

# getTedis

Get the Tedis instance from the connection pool

  • interface
getTedis(): Promise<Tedis>;
  • example
const tedis = await tedisPool.getTedis();

# putTedis

Return an instance to the connection pool

  • interface
putTedis(conn: Tedis): void;
  • example
tedisPool.putTedis(tedis);

# release

Release all instances

  • interface
release(): void;
  • example
tedisPool.release();