-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package with IPROTO constants #267
Comments
If there is some convenient way to make it both convenient and language-independent (so it could be used in other connectors), it would be cool. |
It would be nice to parse error codes from We already have some of the constants in: Lines 62 to 174 in d7a422b
But it looks outdated. |
The package parses constants from: - tarantool/src/box/errcode.h - tarantool/src/box/iproto_constants.h - tarantool/src/box/iproto_features.h You could to generate the code with the command: TT_TAG=master make Closes tarantool/go-tarantool#267
The package parses constants from: - tarantool/src/box/errcode.h - tarantool/src/box/iproto_constants.h - tarantool/src/box/iproto_features.h You could to generate the code with the command: TT_TAG=master make Closes tarantool/go-tarantool#267
Now the main package has some constants:
https://github.com/tarantool/go-tarantool/blob/v1.10.0/const.go
But the approach has disadvantages:
KeyFetchPos
? It isIPROTO_FETCH_POSITION
, but I can't confirm this without looking at the Tarantool code. As example, this mismatch of names is confusing when you read this document and try to create a request/parse a response.It would be nice:
https://github.com/tarantool/go-tarantool/iproto
or as a separate packagehttps://github.com/tarantool/go-iproto
with a separate lifecycle).tarantool/src/box/iproto_{constants, features}.h
with a custom generator for the package.Makefile
targets.See also:
tarantool/tarantool#7103
tarantool/tarantool#7951
https://go.dev/blog/generate
The idea is a part of a discussion with @unera :
https://www.notion.so/tarantool/Go-replicator-API-d9c982f15df044ee95d5d7d9d1b5505b
The text was updated successfully, but these errors were encountered: