etcd/client
Documentation
- source: etcd/client.ts
Overview
Classes
Header
getRevision()
The revision of the key-value store when the request was processed.
tsgetRevision(): string;Returns
- Type:
string- Description:
getClusterId()
The ID of the cluster which the request was sent to.
tsgetClusterId(): string;Returns
- Type:
string- Description:
getMemberId()
The ID of the member which the request was handled by.
tsgetMemberId(): string;Returns
- Type:
string- Description:
getRaftTerm()
The Raft term.
tsgetRaftTerm(): string;Returns
- Type:
string- Description:
GetResponse
getHeader()
Retrieves the response header containing cluster metadata.
tsgetHeader(): Header;Returns
- Type:
Header- Description:
getKvsString()
Retrieves the Key-Value pairs with values converted to strings.
tsgetKvsString(): void;Returns
- Type:
void- Description:
getKvsByteArray()
Retrieves the Key-Value pairs with values converted to Int8Array (byte arrays).
tsgetKvsByteArray(): void;Returns
- Type:
void- Description:
getCount()
Retrieves the number of Key-Value pairs returned.
tsgetCount(): number;Returns
- Type:
number- Description:
Client
putStringValue()
Puts (writes) a string value to the specified key.
tsputStringValue(key: string, value: string): void;
Parameter Type Description keystringThe key to write to. valuestringThe string value. Returns
- Type:
void- Description:
putByteArrayValue()
Puts (writes) a byte array value to the specified key.
tsputByteArrayValue(key: string, value: Int8Array): void;
Parameter Type Description keystringThe key to write to. valueInt8ArrayThe Int8Array (byte array) value. Returns
- Type:
void- Description:
getHeader()
Retrieves the response header metadata for a key.
tsgetHeader(key: string): Header;
Parameter Type Description keystringThe key to query. Returns
- Type:
Header- Description: The Header object.
getKvsStringValue()
Retrieves the Key-Value pairs as a JavaScript object with string values.
tsgetKvsStringValue(key: string): void;
Parameter Type Description keystringThe key (or key prefix) to query. Returns
- Type:
void- Description: An object mapping keys to string values.
getKvsByteArrayValue()
Retrieves the Key-Value pairs as a JavaScript object with Int8Array values.
tsgetKvsByteArrayValue(key: string): void;
Parameter Type Description keystringThe key (or key prefix) to query. Returns
- Type:
void- Description: An object mapping keys to Int8Array values.
getCount()
Retrieves the count of Key-Value pairs matching the key (or key prefix).
tsgetCount(key: string): number;
Parameter Type Description keystringThe key (or key prefix) to query. Returns
- Type:
number- Description: The count of matching entries.
delete()
Deletes the specified key.
tsdelete(key: string): void;
Parameter Type Description keystringThe key to delete. Returns
- Type:
void- Description:
