-
Notifications
You must be signed in to change notification settings - Fork 3
/
client_dt.go
27 lines (21 loc) · 669 Bytes
/
client_dt.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package riago
// Performs a Riak CRDT Fetch request.
func (c *Client) DtFetch(req *DtFetchReq) (resp *DtFetchResp, err error) {
prof := NewProfile("dt_fetch", string(req.GetBucket()))
defer c.instrument(prof, err)
resp = &DtFetchResp{}
err = c.retry(func() error {
return c.do(MsgDtFetchReq, req, resp, prof)
}, prof)
return
}
// Performs a Riak CRDT Update request.
func (c *Client) DtUpdate(req *DtUpdateReq) (resp *DtUpdateResp, err error) {
prof := NewProfile("dt_update", string(req.GetBucket()))
defer c.instrument(prof, err)
resp = &DtUpdateResp{}
err = c.retry(func() error {
return c.do(MsgDtUpdateReq, req, resp, prof)
}, prof)
return
}