Options
All
  • Public
  • Public/Protected
  • All
Menu

PutBuilder builds a "put" request to etcd.

Hierarchy

Implements

Index

Constructors

constructor

Methods

catch

  • catch<R>(onRejected: (err: any) => R | Promise<R>): Promise<IPutResponse | R>
  • catch implements Promiselike.catch()

    Type parameters

    • R

    Parameters

    • onRejected: (err: any) => R | Promise<R>
        • (err: any): R | Promise<R>
        • Parameters

          • err: any

          Returns R | Promise<R>

    Returns Promise<IPutResponse | R>

Protected createPromise

exec

getPrevious

  • getPrevious instructs etcd to try to get the previous value of the key before setting it. One may not always be available if a compaction takes place.

    Returns Promise<IKeyValue & { header: IResponseHeader }>

ignoreLease

  • ignoreLease(): this
  • Updates the key on its current lease, regardless of what that lease is.

    Returns this

lease

  • lease(lease: number | string | Promise<string | number>): this
  • Sets the lease value to use for storing the key. You usually don't need to use this directly, use client.lease() instead!

    Parameters

    • lease: number | string | Promise<string | number>

    Returns this

op

options

  • options(options: CallOptions | undefined): this
  • Sets the GRPC call options for this request.

    Parameters

    • options: CallOptions | undefined

    Returns this

then

  • then<R, V>(onFulfilled: (value: IPutResponse) => R | Promise<R>, onRejected?: undefined | ((err: any) => V | Promise<V>)): Promise<R | V>
  • then implements Promiselike.then()

    Type parameters

    • R

    • V

    Parameters

    • onFulfilled: (value: IPutResponse) => R | Promise<R>
    • Optional onRejected: undefined | ((err: any) => V | Promise<V>)

    Returns Promise<R | V>

touch

  • Touch updates the key's revision without changing its value. This is equivalent to the etcd 'ignore value' flag.

    Returns Promise<IPutResponse>

value

  • value(value: string | Buffer | number): this
  • value sets the value that will be stored in the key.

    Parameters

    • value: string | Buffer | number

    Returns this

Legend

  • Constructor
  • Method
  • Inherited method

Generated using TypeDoc