forked from fl00r/go-tarantool-1.6
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 60
Closed
tarantool/go-iproto
#1Labels
Description
Now the main package has some constants:
https://github.com/tarantool/go-tarantool/blob/v1.10.0/const.go
But the approach has disadvantages:
- Not all constants refer to the IPROTO protocol.
- It is not always obvious how these constants relate to IPROTO. As example, what is 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.
- The file is edited manually, it contains only what is needed for the connector.
- v2: update public API #158
It would be nice:
- To create a separate package (as a part of the connector https://github.com/tarantool/go-tarantool/iprotoor as a separate packagehttps://github.com/tarantool/go-iprotowith a separate lifecycle).
- Periodically auto-generate IPROTO constants from tarantool/src/box/iproto_{constants, features}.hwith a custom generator for the package.
- An update requires as few manual actions as possible (start a job on GitHub Actions?). But we could start with Makefiletargets.
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
LeonidVas and DifferentialOrangeunera