File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,21 @@ class Request {
4040 * @return {!CallOptions|undefined }
4141 */
4242 getCallOptions ( ) { }
43+
44+ /**
45+ * @param {string } key
46+ * @param {string } value
47+ * @return {!Request<REQUEST, RESPONSE> }
48+ */
49+ withMetadata ( key , value ) { }
50+
51+ /**
52+ * @param {string } name
53+ * @param {VALUE } value
54+ * @template VALUE
55+ * @return {!Request<REQUEST, RESPONSE> }
56+ */
57+ withGrpcCallOption ( name , value ) { }
4358}
4459
4560exports = Request ;
Original file line number Diff line number Diff line change @@ -73,6 +73,22 @@ class RequestInternal {
7373 getCallOptions ( ) {
7474 return this . callOptions_ ;
7575 }
76+
77+ /**
78+ * @override
79+ */
80+ withMetadata ( key , value ) {
81+ this . metadata_ [ key ] = value ;
82+ return this ;
83+ }
84+
85+ /**
86+ * @override
87+ */
88+ withGrpcCallOption ( name , value ) {
89+ this . callOptions_ . setOption ( name , value ) ;
90+ return this ;
91+ }
7692}
7793
7894exports = RequestInternal ;
You can’t perform that action at this time.
0 commit comments