Skip to content

Commit 0e4a349

Browse files
committed
chore: deprecate metadata methods
1 parent a7b74d5 commit 0e4a349

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/sdk-ts/src/client/base/BaseGrpcConsumer.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export default class BaseGrpcConsumer {
2727
this.transport = new GrpcWebRpcTransport(endpoint, options)
2828
}
2929

30+
/**
31+
* @deprecated Pass options into the constructor instead
32+
*/
3033
public setMetadata(map: Record<string, string>) {
3134
this.metadata = map
3235
// Recreate transport with new metadata, preserving existing options
@@ -37,6 +40,9 @@ export default class BaseGrpcConsumer {
3740
return this
3841
}
3942

43+
/**
44+
* @deprecated Manage options within the constructor instead
45+
*/
4046
public clearMetadata() {
4147
this.metadata = undefined
4248
}
@@ -65,6 +71,7 @@ export default class BaseGrpcConsumer {
6571

6672
/**
6773
* Builds RpcOptions with metadata
74+
* @deprecated Options should be managed externally and passed into the constructor instead
6875
*/
6976
protected getRpcOptions(): RpcOptions {
7077
const options: RpcOptions = {

0 commit comments

Comments
 (0)