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

Readonly end

end: Buffer

Readonly 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

  • Constructor
  • Method
  • Inherited method

Generated using TypeDoc