const client = new grpc.Client();
client.load(
[PROTO_PATH] // some global path
, "service.proto"
);
<...>
export default () => {
client.connect(`${HOST}:${GRPC_PORT}`, {
plaintext: true
});
const response = client.invoke("<req_name>", {
<data>
});
check(response, {
'status is OK': (r) => r && r.status === grpc.StatusOK,
});
log(JSON.stringify(response));
client.close();
}
But getting error:
ERRO[0000] GoError: method "/<req_name>" not found in file descriptors
at reflect.methodValueCall (native)
at O (webpack://k6-test/./src/main.js:49:22(27))
at native executor=shared-iterations scenario=default source=stacktrace
And I can’t get why I got this error. My proto file split into several, may it cause problem? Does k6 support import in proto?