No results for

Powered byAlgolia
⚠️ This is archived documentation for v0.33. Go to the latest version

Params is an object used by the gRPC methods that generate RPC requests. Params contains request-specific options like headers that should be inserted into the request.

Params.headersobjectObject with key-value pairs representing custom headers the user would like to add to the request.
Params.tagsobjectKey-value pairs where the keys are names of tags and the values are tag values. Response time metrics generated as a result of the request will have these tags added to them, allowing the user to filter out those results specifically, when looking at results data.
Params.timeoutnumberRequest timeout to use. Default timeout is 60 seconds ("60s").

Example of custom metadata headers and tags

import grpc from 'k6/net/grpc';
const client = new grpc.Client();
client.load([], 'route_guide.proto');
export default function () {
const req = {
latitude: 410248224,
longitude: -747127767,
const params = {
headers: { 'x-my-header': 'k6test' },
tags: { k6test: 'yes' },
const response = client.invoke('main.RouteGuide/GetFeature', req, params);