Skip to content
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

api: implement VshardRouterCallResp.GetTransparent method (resolve #22) #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nurzhan-saktaganov
Copy link
Contributor

What has been done? Why? What problem is being solved?

I didn't forget about (remove if it is not applicable):

Related issues:

// If you have some custom decoder for some lua handler's response, you can reuse your decoder using this method.
// P.S. the maximum length of the response array is cut to 3 elements due to lua vshard storage implementation
// see https://github.com/tarantool/vshard/blob/dfa2cc8a2aff221d5f421298851a9a229b2e0434/vshard/storage/init.lua#L3130.
func (r VshardRouterCallResp) GetTransparent(result interface{}) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it better to use upcast in GetTyped func instead new decode function
and always use buffer instead raw messages and repack it

ref: KaymeKaydex/go-vshard-router#122

@@ -111,3 +111,54 @@ func TestRouterCallProto(t *testing.T) {
_, _, err = router.RouterCallImpl(ctx, bucketID, callOpts, "echo", args)
require.Nil(t, err, "RouterCallImpl echo finished with no err even on dirty bucket map")
}

func TestRouterCallProto(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we also dont use tests/tnt folder anymore, use tarantool_test.go instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants