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?
Hey, no, i havent solved the problem, i just copied the same file form y repo into my x repo and i removed the import and the usage of the import, and this is how i use it atm. Couldnt find solution for too long, to continue loosing more timeā¦
Probably with copying the google files might do the job but version incompatibility would be a nightmare to manageā¦