diff --git a/sugar.go b/sugar.go index 3231d15..057d33c 100644 --- a/sugar.go +++ b/sugar.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/tarantool/go-iproto" "github.com/tarantool/go-tarantool/v2/pool" ) @@ -83,6 +84,22 @@ func (req *CallRequest) Context(ctx context.Context) *CallRequest { return req } +// Type returns the type of the request, which is always IProto Call. +func (req *CallRequest) Type() iproto.Type { + return iproto.IPROTO_CALL +} + +// Ctx returns the context associated with the request, +// which can be used for cancellation, deadlines, etc. +func (req *CallRequest) Ctx() context.Context { + return req.ctx +} + +// Async returns false to the request return a response. +func (req *CallRequest) Async() bool { + return false +} + // BucketID method that sets the bucketID for your request. // You can ignore this parameter if you have a bucketGetter. // However, this method has a higher priority.