Options
All
  • Public
  • Public/Protected
  • All
Menu

Range represents a byte range in etcd. Parts of this class are based on the logic found internally within etcd here: https://github.com/coreos/etcd/blob/c4a45c57135bf49ae701352c9151dc1be433d1dd/pkg/adt/interval_tree.go

Hierarchy

  • Range

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Range(start: Buffer | string, end?: Buffer | string): Range
  • Parameters

    • start: Buffer | string
    • Default value end: Buffer | string = emptyKey

    Returns Range

Properties

end

end: Buffer

start

start: Buffer

Methods

compare

  • compare(other: Range): number
  • Compares the other range to this one, returning: -1 if this range comes before the other one 1 if this range comes after the other one 0 if they overlap

    Parameters

    Returns number

includes

  • includes(value: string | Buffer): boolean
  • Returns whether the byte range includes the provided value.

    Parameters

    • value: string | Buffer

    Returns boolean

Static from

Static prefix

  • prefix(prefix: string | Buffer): Range
  • Prefix returns a Range that maps to all keys prefixed with the provided string.

    Parameters

    • prefix: string | Buffer

    Returns Range

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc