Options
All
  • Public
  • Public/Protected
  • All
Menu

A client consuming sessions

const { SessionClient } = require('tog-node')

const tog = new SessionClient('redis://127.0.0.1:6379')

Hierarchy

  • SessionClient

Index

Constructors

constructor

Properties

Readonly cache

cache: {}

Type declaration

  • [namespace: string]: Promise<Flag[]>

Private Readonly flags

flags: FlagClient

Private Readonly logger

logger: Logger

Private Readonly options

Readonly redis

redis: Redis

Readonly subscriber

subscriber: Redis

Methods

Private clearCache

  • clearCache(namespace: string): void

Private listFlags

  • listFlags(namespace: string): Promise<Flag[]>

session

  • Resolves a session, either by retrieving it or by computing a new one

    Parameters

    • namespace: string

      Flags namespace

    • id: string

      Unique session ID

    • Optional options: SessionOptions

      Options used when creating the flag, which are ignored if it already exists

    Returns Promise<Session>

Legend

  • Object literal
  • Variable
  • Function
  • Type alias
  • Class
  • Constructor
  • Property
  • Method
  • Private property
  • Private method
  • Interface

Generated using TypeDoc