net.box: introduce _inject remote method
The inject remote method is used in testing quite a lot. For example, when someone needs to pass arbitrary MsgPack to Tarantool. The current way to use it is: conn:_request(netbox._method.inject, opts, nil, nil, custom_msgpack) This is quite long and ugly, so let's add a helper: conn:_inject(custom_msgpack, opts) Also, while we're at it, lets fix the following issue. The _inject remote method is barely usable without knowing which sync net.box will use for the next request. On the one hand, the user has to encode some custom sync to the request he's injecting. On the other hand, net.box doesn't parse the custom sync and always uses its own pre-generated one to wait for the request response. So the user has to pick the correct sync value, which net.box uses internally. Let's make life simpler and introduce _next_sync method, which returns the next sync, which will be used by net.box. In-scope-of #6857 Closes #7177 NO_DOC=internal change NO_CHANGELOG=internal change NO_TEST=tested implicitly in next commit
Loading