Skip to content

How to access catbox client instances through the framework? #4041

@osukaa

Description

@osukaa

Support plan

  • which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: LTS 12
  • module version: hapi@19
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi application and catbox
  • any other relevant information:

How can we help?

My current setup includes creating a custom catbox Redis client, which also provides metrics as part of its public API.

I would like to know if there's a way to have access to the instance so that I can pull the metrics out.

Or if not possible, is there a way to plug the metrics into the framework itself? through the events or similar?

 const server = hapi.server({
    cache: [
      {
        provider: {
          constructor: require('custom-catbox-redis'),
          options: redisOptions,
        }
      }
    ],
  });

// how could I get the instance back?

Metadata

Metadata

Assignees

Labels

dependencyUpdate module dependencyfeatureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions