Options
All
  • Public
  • Public/Protected
  • All
Menu

A client for managing flags

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

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

Hierarchy

  • FlagClient

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Readonly redis

redis: Redis

Methods

deleteFlag

  • deleteFlag(namespace: string, name: string): Promise<boolean>
  • Deletes a flag from a namespace

    Parameters

    • namespace: string

      Flag namespace

    • name: string

      Flag name

    Returns Promise<boolean>

    Whether a flag existed and was deleted (true), or not (false)

getFlag

  • getFlag(namespace: string, name: string): Promise<Flag>
  • Gets a single flag from a namespace

    Parameters

    • namespace: string

      Flag namespace

    • name: string

      Flag name

    Returns Promise<Flag>

listFlags

  • listFlags(namespace: string): Promise<Flag[]>
  • Lists flags in a namespace

    Parameters

    • namespace: string

      Flags namespace

    Returns Promise<Flag[]>

saveFlag

Legend

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

Generated using TypeDoc